home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / alpha68k.c < prev    next >
C/C++ Source or Header  |  2000-05-23  |  85KB  |  2,369 lines

  1. /***************************************************************************
  2.  
  3.     SNK/Alpha 68000 based games:
  4.  
  5.     (Game)                    (PCB Number)     (Manufacturer)
  6.  
  7.     The Koukouyakyuh        ?                Alpha Denshi 1985
  8.     Super Stingray            ? (Early)        Alpha 1986?
  9.     Kyros                    ? (Early)        World Games Inc 1987
  10.     Paddle Mania            Alpha 68K-96 I   SNK 1988
  11.     Time Soldiers (Ver 3)    Alpha 68K-96 II  SNK/Romstar 1987
  12.     Time Soldiers (Ver 1)    Alpha 68K-96 II  SNK/Romstar 1987
  13.     Battlefield (Ver 1)        Alpha 68K-96 II  SNK 1987
  14.     Sky Soldiers            Alpha 68K-96 II  SNK/Romstar 1988
  15.     Gold Medalist            Alpha 68K-96 II  SNK 1988
  16.     Gold Medalist           (Bootleg)        SNK 1988
  17.     Sky Adventure            Alpha 68K-96 V   SNK 1989
  18.     Gang Wars                Alpha 68K-96 V   Alpha 1989
  19.     Gang Wars                (Bootleg)        Alpha 1989
  20.     Super Champion Baseball (V board?)       SNK/Alpha/Romstar/Sega 1989
  21.  
  22. General notes:
  23.  
  24.     The Koukouyakyuh is different hardware design from the other games.
  25.  
  26.     All II & V games are 68000, z80 plus a custom Alpha microcontroller,
  27.     the microcontroller is able to write to anywhere within main memory.
  28.  
  29.     Gold Medalist (bootleg) has a 68705 in place of the Alpha controller.
  30.  
  31.     V boards have more memory and double the amount of colours as II boards.
  32.  
  33.     Coinage is controlled by the microcontroller and is not fully supported
  34.     for all games yet.
  35.  
  36.     Time Soldiers - make the ROM writable and the game will enter a 'debug'
  37.     kind of mode, probably from the development system used.
  38.  
  39.     Time Soldiers - Title screen is corrupt when set to 'Japanese language',
  40.     the real board does this too!  (Battlefield is corrupt when set to English
  41.     too).
  42.  
  43.     Paddle Mania is (c) 1988 but is crude hardware and there are probably
  44.     several earlier games running on it.
  45.  
  46.     Emulation by Bryan McPhail, mish@tendril.co.uk
  47.  
  48. ***************************************************************************/
  49.  
  50. #include "driver.h"
  51. #include "vidhrdw/generic.h"
  52. #include "cpu/z80/z80.h"
  53.  
  54. int kouyakyu_vh_start(void);
  55. int alpha68k_vh_start(void);
  56. void kyros_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  57. void sstingry_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  58. void alpha68k_I_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  59. void alpha68k_I_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  60. void kouyakyu_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  61. void kyros_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  62. void alpha68k_II_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  63. WRITE_HANDLER( alpha68k_II_video_bank_w );
  64. void alpha68k_V_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  65. void alpha68k_V_sb_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  66. WRITE_HANDLER( alpha68k_V_video_bank_w );
  67. WRITE_HANDLER( alpha68k_V_video_control_w );
  68. WRITE_HANDLER( alpha68k_paletteram_w );
  69. WRITE_HANDLER( alpha68k_flipscreen_w );
  70. WRITE_HANDLER( alpha68k_videoram_w );
  71. WRITE_HANDLER( kouyakyu_video_w );
  72.  
  73. static unsigned char *shared_ram,*sound_ram;
  74. static int invert_controls,microcontroller_id;
  75.  
  76. /******************************************************************************/
  77.  
  78. static READ_HANDLER( alpha68k_II_video_r )
  79. {
  80.     return READ_WORD(&videoram[offset]);
  81. }
  82.  
  83. static READ_HANDLER( control_1_r )
  84. {
  85.     if (invert_controls)
  86.         return ~(readinputport(0) + (readinputport(1) << 8));
  87.  
  88.     return (readinputport(0) + (readinputport(1) << 8));
  89. }
  90.  
  91. static READ_HANDLER( control_2_r )
  92. {
  93.     if (invert_controls)
  94.         return ~(readinputport(3) + ((~(1 << (readinputport(5) * 12 / 256))) << 8));
  95.  
  96.     return readinputport(3) + /* Low byte of CN1 */
  97.         ((~(1 << (readinputport(5) * 12 / 256))) << 8);
  98. }
  99.  
  100. static READ_HANDLER( control_2_V_r )
  101. {
  102.     return readinputport(3);
  103. }
  104.  
  105. static READ_HANDLER( kyros_dip_r )
  106. {
  107.     return readinputport(1)<<8;
  108. }
  109.  
  110. static READ_HANDLER( control_3_r )
  111. {
  112.     if (invert_controls)
  113.         return ~((( ~(1 << (readinputport(6) * 12 / 256)) )<<8)&0xff00);
  114.  
  115.     return (( ~(1 << (readinputport(6) * 12 / 256)) )<<8)&0xff00;
  116. }
  117.  
  118. /* High 4 bits of CN1 & CN2 */
  119. static READ_HANDLER( control_4_r )
  120. {
  121.     if (invert_controls)
  122.         return ~(((( ~(1 << (readinputport(6) * 12 / 256))  ) <<4)&0xf000)
  123.          + ((( ~(1 << (readinputport(5) * 12 / 256))  )    )&0x0f00));
  124.  
  125.     return ((( ~(1 << (readinputport(6) * 12 / 256))  ) <<4)&0xf000)
  126.          + ((( ~(1 << (readinputport(5) * 12 / 256))  )    )&0x0f00);
  127. }
  128.  
  129. /******************************************************************************/
  130.  
  131. static WRITE_HANDLER( kyros_sound_w )
  132. {
  133.     soundlatch_w(0,(data>>8)&0xff);
  134. }
  135.  
  136. static WRITE_HANDLER( alpha68k_II_sound_w )
  137. {
  138.     soundlatch_w(0,data&0xff);
  139. }
  140.  
  141. static WRITE_HANDLER( alpha68k_V_sound_w )
  142. {
  143.     /* Sound & fix bank select are in the same word */
  144.     if ((data>>16)!=0xff) {
  145.         soundlatch_w(0,data&0xff);
  146.     } else {
  147.         alpha68k_V_video_bank_w(0,(data>>8)&0xff);
  148.     }
  149. }
  150.  
  151. /******************************************************************************/
  152.  
  153. /* Time Soldiers, Sky Soldiers, Gold Medalist */
  154. static READ_HANDLER( alpha_II_trigger_r )
  155. {
  156.     static int latch;
  157.     int source=READ_WORD(&shared_ram[offset]);
  158.  
  159.     switch (offset) {
  160.         case 0:    /* Dipswitch 2 */
  161.             WRITE_WORD(&shared_ram[0], (source&0xff00)| readinputport(4));
  162.             return 0;
  163.  
  164.         case 0x44: /* Coin value */
  165.             WRITE_WORD(&shared_ram[0x44], (source&0xff00)|0x1);
  166.             return 0;
  167.  
  168.         case 0x52: /* Query microcontroller for coin insert */
  169.             if ((readinputport(2)&0x3)==3) latch=0;
  170.             if ((readinputport(2)&0x1)==0 && !latch) {
  171.                 WRITE_WORD(&shared_ram[0x52], (source&0xff00)|0x22);
  172.                 WRITE_WORD(&shared_ram[0x44], (source&0xff00)|0x0);
  173.                 latch=1;
  174.             } else if ((readinputport(2)&0x2)==0 && !latch) {
  175.                 WRITE_WORD(&shared_ram[0x52], (source&0xff00)|0x22);
  176.                 WRITE_WORD(&shared_ram[0x44], (source&0xff00)|0x0);
  177.                 latch=1;
  178.             }
  179.             else
  180.                 WRITE_WORD(&shared_ram[0x52], (source&0xff00)|0x00);
  181.             return 0;
  182.  
  183.         case 0x1fc:    /* Custom ID check, same for all games */
  184.             WRITE_WORD(&shared_ram[0x1fc], (source&0xff00)|0x87);
  185.             break;
  186.         case 0x1fe:    /* Custom ID check, same for all games */
  187.             WRITE_WORD(&shared_ram[0x1fe], (source&0xff00)|0x13);
  188.             break;
  189.     }
  190.  
  191.     logerror("%04x:  Alpha read trigger at %04x\n",cpu_get_pc(),offset);
  192.  
  193.     return 0; /* Values returned don't matter */
  194. }
  195.  
  196. /* Sky Adventure & Gang Wars */
  197. static READ_HANDLER( alpha_V_trigger_r )
  198. {
  199.     static int latch;
  200.     int source=READ_WORD(&shared_ram[offset]);
  201.  
  202.     switch (offset) {
  203.         case 0:    /* Dipswitch 1 */
  204.             WRITE_WORD(&shared_ram[0], (source&0xff00)| readinputport(4));
  205.             return 0;
  206.  
  207.         case 0x44: /* Coin value */
  208.             WRITE_WORD(&shared_ram[0x44], (source&0xff00)|0x1);
  209.             return 0;
  210.         case 0x52: /* Query microcontroller for coin insert */
  211.             if ((readinputport(2)&0x3)==3) latch=0;
  212.             if ((readinputport(2)&0x1)==0 && !latch) {
  213.                 WRITE_WORD(&shared_ram[0x52], (source&0xff00)|0x23);
  214.                 WRITE_WORD(&shared_ram[0x44], (source&0xff00)|0x0);
  215.                 latch=1;
  216.             }
  217.             else if ((readinputport(2)&0x2)==0 && !latch) {
  218.                 WRITE_WORD(&shared_ram[0x52], (source&0xff00)|0x24);
  219.                 WRITE_WORD(&shared_ram[0x44], (source&0xff00)|0x0);
  220.                 latch=1;
  221.             }
  222.             else
  223.                 WRITE_WORD(&shared_ram[0x52], (source&0xff00)|0x00);
  224.             return 0;
  225.  
  226. //        case 0x62: /* Sky Adventure - I don't think is correct, but it works */
  227. //            WRITE_WORD(&shared_ram[0x154], 0xffff);
  228. //            return 0;
  229.  
  230.         case 0x1fc:    /* Custom ID check */
  231.             WRITE_WORD(&shared_ram[0x1fc], (source&0xff00)|(microcontroller_id>>8));
  232.             break;
  233.         case 0x1fe:    /* Custom ID check */
  234.             WRITE_WORD(&shared_ram[0x1fe], (source&0xff00)|(microcontroller_id&0xff));
  235.             break;
  236.  
  237.         case 0x3e00: /* Dipswitch 1 */
  238.             WRITE_WORD(&shared_ram[0x3e00], (source&0xff00)| readinputport(4));
  239.             return 0;
  240.         case 0x3e52: /* Gang Wars - Query microcontroller for coin insert */
  241.             if ((readinputport(2)&0x3)==3) latch=0;
  242.             if ((readinputport(2)&0x1)==0 && !latch) {
  243.                 WRITE_WORD(&shared_ram[0x3e52], (source&0xff00)|0x23);
  244.                 WRITE_WORD(&shared_ram[0x3e44], (source&0xff00)|0x0);
  245.                 latch=1;
  246.             }
  247.             else if ((readinputport(2)&0x2)==0 && !latch) {
  248.                 WRITE_WORD(&shared_ram[0x3e52], (source&0xff00)|0x24);
  249.                 WRITE_WORD(&shared_ram[0x3e44], (source&0xff00)|0x0);
  250.                 latch=1;
  251.             }
  252.             else
  253.                 WRITE_WORD(&shared_ram[0x3e52], (source&0xff00)|0x00);
  254.  
  255.             /* The game expects the first dip to appear in RAM at 0x2c6, presumably
  256.                 the microcontroller supplies it (it does for all the other games, but
  257.                 usually to 0x0 in RAM) */
  258.             source=READ_WORD(&shared_ram[0x2c6]);
  259.             WRITE_WORD(&shared_ram[0x2c6], (source&0x00ff)| (readinputport(4)<<8));
  260.             return 0;
  261.  
  262.         case 0x3ffc: /* Custom ID check, Gang Wars */
  263.             WRITE_WORD(&shared_ram[0x3ffc], (source&0xff00)|(microcontroller_id>>8));
  264.             break;
  265.         case 0x3ffe: /* Custom ID check, Gang Wars */
  266.             WRITE_WORD(&shared_ram[0x3ffe], (source&0xff00)|(microcontroller_id&0xff));
  267.             break;
  268.     }
  269.  
  270.     logerror("%04x:  Alpha read trigger at %04x\n",cpu_get_pc(),offset);
  271.  
  272.     return 0; /* Values returned don't matter */
  273. }
  274.  
  275. static WRITE_HANDLER( alpha_microcontroller_w )
  276. {
  277.     logerror("%04x:  Alpha write trigger at %04x (%04x)\n",cpu_get_pc(),offset,data);
  278.     /* 0x44 = coin clear signal to microcontroller? */
  279.     if (offset==0x5a) alpha68k_flipscreen_w(0,data);
  280. }
  281.  
  282. static READ_HANDLER( kyros_alpha_trigger_r )
  283. {
  284.     static int latch;
  285.     int source=READ_WORD(&shared_ram[offset]);
  286.  
  287.     switch (offset) {
  288.         case 0x44: /* Coin value */
  289.             WRITE_WORD(&shared_ram[0x44], (source&0xff00)|0x1);
  290.             return 0;
  291.         case 0x52: /* Query microcontroller for coin insert */
  292.             if ((readinputport(2)&0x1)==1) latch=0;
  293.             if ((readinputport(2)&0x1)==0 && !latch) {
  294.                 WRITE_WORD(&shared_ram[0x52], (source&0xff00)|0x22);
  295.                 WRITE_WORD(&shared_ram[0x44], (source&0xff00)|0x0);
  296.                 latch=1;
  297.             }
  298.             else
  299.                 WRITE_WORD(&shared_ram[0x52], (source&0xff00)|0x00);
  300.             return 0;
  301.  
  302.         case 0x1fe:    /* Custom check, only used at bootup */
  303.             WRITE_WORD(&shared_ram[0x1fe], (source&0xff00)|microcontroller_id);
  304.             break;
  305.  
  306.     }
  307.  
  308.     logerror("%04x:  Alpha read trigger at %04x\n",cpu_get_pc(),offset);
  309.  
  310.     return 0; /* Values returned don't matter */
  311. }
  312.  
  313. /******************************************************************************/
  314.  
  315. static struct MemoryReadAddress kouyakyu_readmem[] =
  316. {
  317.     { 0x000000, 0x01ffff, MRA_ROM },
  318.     { 0x040000, 0x040fff, MRA_BANK1 },
  319.     { 0x080000, 0x081fff, MRA_BANK2 },
  320.     { 0x0c0000, 0x0c0fff, MRA_BANK3 },
  321.     { 0x100000, 0x1007ff, MRA_BANK4 },
  322.     { 0x140000, 0x1407ff, MRA_BANK5 },
  323.     { -1 }  /* end of table */
  324. };
  325.  
  326. static struct MemoryWriteAddress kouyakyu_writemem[] =
  327. {
  328.     { 0x000000, 0x01ffff, MWA_ROM },
  329.     { 0x040000, 0x040fff, MWA_BANK1, &shared_ram },
  330.     { 0x080000, 0x080fff, kouyakyu_video_w, &videoram },
  331.     { 0x0c0000, 0x0c0fff, MWA_BANK3, &spriteram },
  332.     { 0x100000, 0x1007ff, MWA_BANK4 },
  333.     { 0x140000, 0x1407ff, MWA_BANK5 },
  334.     { 0x780000, 0x780001, MWA_NOP }, /* Watchdog? */
  335.     { -1 }  /* end of table */
  336. };
  337.  
  338. static struct MemoryReadAddress kyros_readmem[] =
  339. {
  340.     { 0x000000, 0x01ffff, MRA_ROM },
  341.     { 0x020000, 0x020fff, MRA_BANK1 },
  342.     { 0x040000, 0x041fff, MRA_BANK2 },
  343.     { 0x060000, 0x060001, MRA_NOP }, /* Watchdog? */
  344.     { 0x080000, 0x0801ff, kyros_alpha_trigger_r },
  345.     { 0x0c0000, 0x0c0001, input_port_0_r },
  346.     { 0x0e0000, 0x0e0001, kyros_dip_r },
  347.     { -1 }  /* end of table */
  348. };
  349.  
  350. static struct MemoryWriteAddress kyros_writemem[] =
  351. {
  352.     { 0x000000, 0x01ffff, MWA_ROM },
  353.     { 0x020000, 0x020fff, MWA_BANK1, &shared_ram },
  354.     { 0x040000, 0x041fff, MWA_BANK2, &spriteram },
  355.     { 0x060000, 0x060001, alpha68k_II_sound_w }, /* Watchdog? */
  356.     { 0x0e0000, 0x0e0001, kyros_sound_w },
  357.     { -1 }  /* end of table */
  358. };
  359.  
  360. static struct MemoryReadAddress alpha68k_I_readmem[] =
  361. {
  362.     { 0x000000, 0x03ffff, MRA_ROM },
  363.     { 0x080000, 0x083fff, MRA_BANK1 },
  364. //    { 0x180008, 0x180009, control_2_r }, /* 1 byte */
  365.     { 0x300000, 0x300001, control_1_r }, /* 2  */
  366.     { 0x340000, 0x340001, control_1_r }, /* 2  */
  367.     { 0x100000, 0x103fff, MRA_BANK2 },
  368.     { -1 }  /* end of table */
  369. };
  370.  
  371. static struct MemoryWriteAddress alpha68k_I_writemem[] =
  372. {
  373.     { 0x000000, 0x03ffff, MWA_NOP },
  374.     { 0x080000, 0x083fff, MWA_BANK1, &shared_ram },
  375.     { 0x100000, 0x103fff, MWA_BANK2, &spriteram },
  376.     { 0x180000, 0x180001, MWA_NOP }, /* Watchdog */
  377.     { 0x380000, 0x380001, alpha68k_II_sound_w },
  378.     { -1 }  /* end of table */
  379. };
  380.  
  381. static struct MemoryReadAddress alpha68k_II_readmem[] =
  382. {
  383.     { 0x000000, 0x03ffff, MRA_ROM },
  384.     { 0x040000, 0x040fff, MRA_BANK1 },
  385.     { 0x080000, 0x080001, control_1_r }, /* Joysticks */
  386.     { 0x0c0000, 0x0c0001, control_2_r }, /* CN1 & Dip 1 */
  387.     { 0x0c8000, 0x0c8001, control_3_r }, /* Bottom of CN2 */
  388.     { 0x0d0000, 0x0d0001, control_4_r }, /* Top of CN1 & CN2 */
  389.     { 0x0d8000, 0x0d8001, MRA_NOP }, /* IRQ ack? */
  390.     { 0x0e0000, 0x0e0001, MRA_NOP }, /* IRQ ack? */
  391.     { 0x0e8000, 0x0e8001, MRA_NOP }, /* watchdog? */
  392.     { 0x100000, 0x100fff, alpha68k_II_video_r },
  393.     { 0x200000, 0x207fff, MRA_BANK2 },
  394.     { 0x300000, 0x3001ff, alpha_II_trigger_r },
  395.     { 0x400000, 0x400fff, paletteram_word_r },
  396.     { 0x800000, 0x83ffff, MRA_BANK8 }, /* Extra code bank */
  397.     { -1 }  /* end of table */
  398. };
  399.  
  400. static struct MemoryWriteAddress alpha68k_II_writemem[] =
  401. {
  402.     { 0x000000, 0x03ffff, MWA_NOP },
  403.     { 0x040000, 0x040fff, MWA_BANK1, &shared_ram },
  404.     { 0x080000, 0x080001, alpha68k_II_sound_w },
  405.     { 0x0c0000, 0x0c00ff, alpha68k_II_video_bank_w },
  406.     { 0x100000, 0x100fff, alpha68k_videoram_w, &videoram },
  407.     { 0x200000, 0x207fff, MWA_BANK2, &spriteram },
  408.     { 0x300000, 0x3001ff, alpha_microcontroller_w },
  409.     { 0x400000, 0x400fff, alpha68k_paletteram_w, &paletteram },
  410.     { -1 }  /* end of table */
  411. };
  412.  
  413. static struct MemoryReadAddress alpha68k_V_readmem[] =
  414. {
  415.     { 0x000000, 0x03ffff, MRA_ROM },
  416.     { 0x040000, 0x043fff, MRA_BANK1 },
  417.     { 0x080000, 0x080001, control_1_r }, /* Joysticks */
  418.     { 0x0c0000, 0x0c0001, control_2_V_r }, /* Dip 2 */
  419.     { 0x0d8000, 0x0d8001, MRA_NOP }, /* IRQ ack? */
  420.     { 0x0e0000, 0x0e0001, MRA_NOP }, /* IRQ ack? */
  421.     { 0x0e8000, 0x0e8001, MRA_NOP }, /* watchdog? */
  422.     { 0x100000, 0x100fff, alpha68k_II_video_r },
  423.     { 0x200000, 0x207fff, MRA_BANK3 },
  424.     { 0x300000, 0x303fff, alpha_V_trigger_r },
  425.     { 0x400000, 0x401fff, paletteram_word_r },
  426.     { 0x800000, 0x83ffff, MRA_BANK8 },
  427.     { -1 }  /* end of table */
  428. };
  429.  
  430. static struct MemoryWriteAddress alpha68k_V_writemem[] =
  431. {
  432.     { 0x000000, 0x03ffff, MWA_NOP },
  433.     { 0x040000, 0x043fff, MWA_BANK1, &shared_ram },
  434.     { 0x080000, 0x080001, alpha68k_V_sound_w },
  435.     { 0x0c0000, 0x0c00ff, alpha68k_V_video_control_w },
  436.     { 0x100000, 0x100fff, alpha68k_videoram_w, &videoram },
  437.     { 0x200000, 0x207fff, MWA_BANK3, &spriteram },
  438.     { 0x303e00, 0x303fff, alpha_microcontroller_w },
  439.     { 0x400000, 0x401fff, alpha68k_paletteram_w, &paletteram },
  440.     { -1 }  /* end of table */
  441. };
  442.  
  443. /******************************************************************************/
  444.  
  445. static WRITE_HANDLER( sound_bank_w )
  446. {
  447.     int bankaddress;
  448.     unsigned char *RAM = memory_region(REGION_CPU2);
  449.  
  450.     bankaddress = 0x10000 + (data) * 0x4000;
  451.     cpu_setbank(7,&RAM[bankaddress]);
  452. }
  453.  
  454. static struct MemoryReadAddress sound_readmem[] =
  455. {
  456.     { 0x0000, 0x7fff, MRA_ROM },
  457.     { 0x8000, 0x87ff, MRA_RAM },
  458.     { 0xc000, 0xffff, MRA_BANK7 },
  459.     { -1 }    /* end of table */
  460. };
  461.  
  462. static struct MemoryWriteAddress sound_writemem[] =
  463. {
  464.     { 0x0000, 0x7fff, MWA_ROM },
  465.     { 0x8000, 0x87ff, MWA_RAM },
  466.     { -1 }    /* end of table */
  467. };
  468.  
  469. static struct MemoryReadAddress kyros_sound_readmem[] =
  470. {
  471.     { 0x0000, 0x7fff, MRA_ROM },
  472.     { 0xc000, 0xc7ff, MRA_RAM },
  473. //    { 0xe000, 0xe000, soundlatch_r },
  474. //    { 0xc000, 0xffff, MRA_BANK7 },
  475.     { -1 }    /* end of table */
  476. };
  477.  
  478. static struct MemoryWriteAddress kyros_sound_writemem[] =
  479. {
  480.     { 0x0000, 0x7fff, MWA_ROM },
  481.     { 0xc000, 0xc7ff, MWA_RAM },
  482.     { -1 }    /* end of table */
  483. };
  484.  
  485. static struct MemoryReadAddress sstingry_sound_readmem[] =
  486. {
  487.     { 0x0000, 0x7fff, MRA_ROM },
  488.     { 0x8000, 0x83ff, MRA_RAM },
  489. //    { 0xe000, 0xe000, soundlatch_r },
  490. //    { 0xc000, 0xffff, MRA_BANK7 },
  491.     { -1 }    /* end of table */
  492. };
  493.  
  494. static WRITE_HANDLER (soundram_mirror_w)
  495. {
  496.     sound_ram[offset]=data;
  497. }
  498.  
  499. static struct MemoryWriteAddress sstingry_sound_writemem[] =
  500. {
  501.     { 0x0000, 0x7fff, MWA_ROM },
  502.     { 0x8000, 0x83ff, MWA_RAM, &sound_ram },
  503. //    { 0xc000, 0xc3ff, soundram_mirror_w },
  504.     { -1 }    /* end of table */
  505. };
  506.  
  507. static struct IOReadPort sound_readport[] =
  508. {
  509.     { 0x00, 0x00, soundlatch_r },
  510.     { -1 }
  511. };
  512.  
  513. static struct IOWritePort sound_writeport[] =
  514. {
  515.     { 0x00, 0x00, soundlatch_clear_w },
  516.     { 0x08, 0x08, DAC_0_signed_data_w },
  517.     { 0x0a, 0x0a, YM2413_register_port_0_w },
  518.     { 0x0b, 0x0b, YM2413_data_port_0_w },
  519.     { 0x0c, 0x0c, YM2203_control_port_0_w },
  520.     { 0x0d, 0x0d, YM2203_write_port_0_w },
  521.     { 0x0e, 0x0e, sound_bank_w },
  522.     { -1 }
  523. };
  524.  
  525. static struct IOWritePort kyros_sound_writeport[] =
  526. {
  527. //    { 0x00, 0x00, soundlatch_clear_w },
  528. //    { 0x08, 0x08, DAC_0_data_w },
  529.     { 0x10, 0x10, YM2203_control_port_0_w },
  530.     { 0x11, 0x11, YM2203_write_port_0_w },
  531.     { 0x80, 0x80, AY8910_write_port_0_w },
  532.     { 0x81, 0x81, AY8910_control_port_0_w },
  533.     { 0x90, 0x90, AY8910_write_port_1_w },
  534.     { 0x91, 0x91, AY8910_control_port_1_w },
  535.     { -1 }
  536. };
  537.  
  538. /******************************************************************************/
  539.  
  540. #define ALPHA68K_PLAYER1_INPUT \
  541.     PORT_START    /* Player 1 controls */ \
  542.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY ) \
  543.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY ) \
  544.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY ) \
  545.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) \
  546.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) \
  547.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) \
  548.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* Button 3 */ \
  549.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) \
  550.  
  551. #define ALPHA68K_PLAYER2_INPUT \
  552.     PORT_START    /* Player 2 controls */ \
  553.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 ) \
  554.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 ) \
  555.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 ) \
  556.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 ) \
  557.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) \
  558.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) \
  559.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* Button 3 */ \
  560.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  561.  
  562. INPUT_PORTS_START( kyros )
  563.     PORT_START
  564.     PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
  565.     PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  566.     PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  567.     PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  568.     PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  569.     PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  570.     PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 )
  571.     PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_START1 )
  572.     PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  573.     PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  574.     PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  575.     PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT| IPF_8WAY | IPF_COCKTAIL )
  576.     PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
  577.     PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL )
  578.     PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_COCKTAIL )
  579.     PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START2 )
  580.  
  581.     PORT_START    /* dipswitches */
  582.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
  583.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  584.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  585.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
  586.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  587.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  588.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
  589.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  590.     PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  591.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) // demo sound?
  592.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  593.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  594.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  595.     PORT_DIPSETTING(    0x00, "3" )
  596.     PORT_DIPSETTING(    0x10, "4" )
  597.     PORT_DIPSETTING(    0x20, "5" )
  598.     PORT_DIPSETTING(    0x30, "6" )
  599.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
  600.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  601.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  602.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
  603.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  604.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  605.  
  606.     PORT_START /* Coin input to microcontroller */
  607.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  608.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  609. INPUT_PORTS_END
  610.  
  611. INPUT_PORTS_START( sstingry )
  612.     PORT_START
  613.     PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
  614.     PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  615.     PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  616.     PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  617.     PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  618.     PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  619.     PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 )
  620.     PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_START1 )
  621.     PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  622.     PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  623.     PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  624.     PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT| IPF_8WAY | IPF_COCKTAIL )
  625.     PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
  626.     PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_COCKTAIL )
  627.     PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_COCKTAIL )
  628.     PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START2 )
  629.  
  630.     PORT_START    /* Player 1 controls */
  631.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  632.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  633.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  634.     PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  635.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  636.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  637.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  638.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  639.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  640.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  641.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  642.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  643.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  644.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  645.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  646.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
  647.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  648.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  649.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  650.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  651.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  652.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  653.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  654.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  655.  
  656.     PORT_START    /* Coin input to microcontroller */
  657.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  658.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  659. INPUT_PORTS_END
  660.  
  661. INPUT_PORTS_START( timesold )
  662.     ALPHA68K_PLAYER1_INPUT
  663.     ALPHA68K_PLAYER2_INPUT
  664.  
  665.     PORT_START    /* Coin input to microcontroller */
  666.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  667.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  668.  
  669.     PORT_START    /* Service + dip */
  670.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  671.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  672.  
  673.     /* 2 physical sets of _6_ dip switches */
  674.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) )
  675.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  676.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  677.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) )
  678.     PORT_DIPSETTING(    0x00, "Easy" )
  679.     PORT_DIPSETTING(    0x18, "Normal" )
  680.     PORT_DIPSETTING(    0x10, "Difficult" )
  681.     PORT_DIPNAME( 0x20, 0x00, "Language" )
  682.     PORT_DIPSETTING(    0x00, "English" )
  683.     PORT_DIPSETTING(    0x20, "Japanese" )
  684.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  685.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  686.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  687.     PORT_BITX(    0x80, 0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  688.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  689.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  690.  
  691.     PORT_START /* A 6 way dip switch */
  692.     PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) )
  693.     PORT_DIPSETTING(    0x00, "A 3C/2C B 8C/1C" )
  694.     PORT_DIPSETTING(    0x01, "A 2C/3C B 7C/1C" )
  695.     PORT_DIPSETTING(    0x07, "A 1C/1C B 1C/1C" )
  696.     PORT_DIPSETTING(    0x06, "A 1C/2C B 2C/1C" )
  697.     PORT_DIPSETTING(    0x05, "A 1C/3C B 3C/1C" )
  698.     PORT_DIPSETTING(    0x04, "A 1C/4C B 4C/1C" )
  699.     PORT_DIPSETTING(    0x03, "A 1C/5C B 5C/1C" )
  700.     PORT_DIPSETTING(    0x02, "A 1C/6C B 6C/1C" )
  701.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  702.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  703.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  704.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
  705.     PORT_DIPSETTING(    0x30, "3" )
  706.     PORT_DIPSETTING(    0x20, "4" )
  707.     PORT_DIPSETTING(    0x10, "5" )
  708.     PORT_DIPSETTING(    0x00, "6" )
  709.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  710.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  711.  
  712.     PORT_START    /* player 1 12-way rotary control - converted in controls_r() */
  713.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE, 25, 8, 0, 0, KEYCODE_Z, KEYCODE_X, 0, 0 )
  714.  
  715.     PORT_START    /* player 2 12-way rotary control - converted in controls_r() */
  716.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE | IPF_PLAYER2, 25, 8, 0, 0, KEYCODE_N, KEYCODE_M, 0, 0 )
  717. INPUT_PORTS_END
  718.  
  719. INPUT_PORTS_START( btlfield )
  720.     ALPHA68K_PLAYER1_INPUT
  721.     ALPHA68K_PLAYER2_INPUT
  722.  
  723.     PORT_START    /* Coin input to microcontroller */
  724.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  725.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  726.  
  727.     PORT_START    /* Service + dip */
  728.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  729.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  730.  
  731.     /* 2 physical sets of _6_ dip switches */
  732.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) )
  733.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  734.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  735.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) )
  736.     PORT_DIPSETTING(    0x00, "Easy" )
  737.     PORT_DIPSETTING(    0x18, "Normal" )
  738.     PORT_DIPSETTING(    0x10, "Difficult" )
  739.     PORT_DIPNAME( 0x20, 0x20, "Language" )
  740.     PORT_DIPSETTING(    0x00, "English" )
  741.     PORT_DIPSETTING(    0x20, "Japanese" )
  742.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  743.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  744.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  745.     PORT_BITX(    0x80, 0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  746.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  747.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  748.  
  749.     PORT_START /* A 6 way dip switch */
  750.     PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) )
  751.     PORT_DIPSETTING(    0x00, "A 3C/2C B 8C/1C" )
  752.     PORT_DIPSETTING(    0x01, "A 2C/3C B 7C/1C" )
  753.     PORT_DIPSETTING(    0x07, "A 1C/1C B 1C/1C" )
  754.     PORT_DIPSETTING(    0x06, "A 1C/2C B 2C/1C" )
  755.     PORT_DIPSETTING(    0x05, "A 1C/3C B 3C/1C" )
  756.     PORT_DIPSETTING(    0x04, "A 1C/4C B 4C/1C" )
  757.     PORT_DIPSETTING(    0x03, "A 1C/5C B 5C/1C" )
  758.     PORT_DIPSETTING(    0x02, "A 1C/6C B 6C/1C" )
  759.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  760.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  761.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  762.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
  763.     PORT_DIPSETTING(    0x30, "3" )
  764.     PORT_DIPSETTING(    0x20, "4" )
  765.     PORT_DIPSETTING(    0x10, "5" )
  766.     PORT_DIPSETTING(    0x00, "6" )
  767.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  768.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  769.  
  770.     PORT_START    /* player 1 12-way rotary control - converted in controls_r() */
  771.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE, 25, 8, 0, 0, KEYCODE_Z, KEYCODE_X, 0, 0 )
  772.  
  773.     PORT_START    /* player 2 12-way rotary control - converted in controls_r() */
  774.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE | IPF_PLAYER2, 25, 8, 0, 0, KEYCODE_N, KEYCODE_M, 0, 0 )
  775. INPUT_PORTS_END
  776.  
  777. INPUT_PORTS_START( skysoldr )
  778.     ALPHA68K_PLAYER1_INPUT
  779.     ALPHA68K_PLAYER2_INPUT
  780.  
  781.     PORT_START    /* Coin input to microcontroller */
  782.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  783.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  784.  
  785.     PORT_START    /* Service + dip */
  786.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  787.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  788.  
  789.     /* 2 physical sets of _6_ dip switches */
  790.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) )
  791.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  792.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  793.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) )
  794.     PORT_DIPSETTING(    0x00, "Easy" )
  795.     PORT_DIPSETTING(    0x18, "Normal" ) /* 18 Normal */
  796.     PORT_DIPSETTING(    0x10, "Difficult" )
  797.     PORT_DIPNAME( 0x20, 0x00, "Language" )
  798.     PORT_DIPSETTING(    0x00, "English" )
  799.     PORT_DIPSETTING(    0x20, "Japanese" )
  800.     PORT_DIPNAME( 0x40, 0x40, "Manufacturer" )
  801.     PORT_DIPSETTING(    0x40, "SNK" )
  802.     PORT_DIPSETTING(    0x00, "Romstar" )
  803.     PORT_BITX(    0x80, 0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  804.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  805.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  806.  
  807.     PORT_START /* A 6 way dip switch */
  808.     PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) )
  809.     PORT_DIPSETTING(    0x00, "A 3C/2C B 8C/1C" )
  810.     PORT_DIPSETTING(    0x01, "A 2C/3C B 7C/1C" )
  811.     PORT_DIPSETTING(    0x07, "A 1C/1C B 1C/1C" )
  812.     PORT_DIPSETTING(    0x06, "A 1C/2C B 2C/1C" )
  813.     PORT_DIPSETTING(    0x05, "A 1C/3C B 3C/1C" )
  814.     PORT_DIPSETTING(    0x04, "A 1C/4C B 4C/1C" )
  815.     PORT_DIPSETTING(    0x03, "A 1C/5C B 5C/1C" )
  816.     PORT_DIPSETTING(    0x02, "A 1C/6C B 6C/1C" )
  817.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  818.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  819.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  820.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
  821.     PORT_DIPSETTING(    0x30, "3" )
  822.     PORT_DIPSETTING(    0x20, "4" )
  823.     PORT_DIPSETTING(    0x10, "5" )
  824.     PORT_DIPSETTING(    0x00, "6" )
  825.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  826.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  827.  
  828.     PORT_START    /* player 1 12-way rotary control */
  829.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  830.  
  831.     PORT_START    /* player 2 12-way rotary control */
  832.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  833. INPUT_PORTS_END
  834.  
  835. INPUT_PORTS_START( goldmedl )
  836.     PORT_START    /* 3 buttons per player, no joystick */
  837.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  838.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  839.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  840.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  841.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  842.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2)
  843.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3 ) /* Doesn't work? */
  844.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  845.  
  846.     PORT_START    /* 3 buttons per player, no joystick */
  847.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  848.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  849.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  850.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  851.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
  852.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
  853.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START4 )
  854.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  855.  
  856.     PORT_START    /* Coin input to microcontroller */
  857.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  858.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  859.  
  860.     PORT_START    /* Service + dip */
  861.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  862.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  863.  
  864.     /* 2 physical sets of _6_ dip switches */
  865.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) )
  866.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  867.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  868.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) )
  869.     PORT_DIPSETTING(    0x00, "Easy" )
  870.     PORT_DIPSETTING(    0x18, "Normal" )
  871.     PORT_DIPSETTING(    0x10, "Difficult" )
  872.     PORT_DIPNAME( 0x20, 0x00, "Language" )
  873.     PORT_DIPSETTING(    0x00, "English" )
  874.     PORT_DIPSETTING(    0x20, "Japanese" )
  875.     PORT_DIPNAME( 0x40, 0x40, "Manufacturer" )
  876.     PORT_DIPSETTING(    0x40, "SNK" )
  877.     PORT_DIPSETTING(    0x00, "Romstar" )
  878.     PORT_BITX(    0x80, 0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  879.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  880.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  881.  
  882.     PORT_START /* A 6 way dip switch */
  883.     PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) )
  884.     PORT_DIPSETTING(    0x00, "A 3C/2C B 8C/1C" )
  885.     PORT_DIPSETTING(    0x01, "A 2C/3C B 7C/1C" )
  886.     PORT_DIPSETTING(    0x07, "A 1C/1C B 1C/1C" )
  887.     PORT_DIPSETTING(    0x06, "A 1C/2C B 2C/1C" )
  888.     PORT_DIPSETTING(    0x05, "A 1C/3C B 3C/1C" )
  889.     PORT_DIPSETTING(    0x04, "A 1C/4C B 4C/1C" )
  890.     PORT_DIPSETTING(    0x03, "A 1C/5C B 5C/1C" )
  891.     PORT_DIPSETTING(    0x02, "A 1C/6C B 6C/1C" )
  892.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  893.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  894.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  895.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
  896.     PORT_DIPSETTING(    0x30, "3" )
  897.     PORT_DIPSETTING(    0x20, "4" )
  898.     PORT_DIPSETTING(    0x10, "5" )
  899.     PORT_DIPSETTING(    0x00, "6" )
  900.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  901.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  902.  
  903.     PORT_START    /* player 1 12-way rotary control */
  904.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  905.  
  906.     PORT_START    /* player 2 12-way rotary control */
  907.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  908. INPUT_PORTS_END
  909.  
  910.  
  911. INPUT_PORTS_START( skyadvnt )
  912.     ALPHA68K_PLAYER1_INPUT
  913.     ALPHA68K_PLAYER2_INPUT
  914.  
  915.     PORT_START    /* Coin input to microcontroller */
  916.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  917.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  918.  
  919.     PORT_START    /* Service + dip */
  920.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  921.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  922.  
  923.     /* Dip 2: 6 way dip switch */
  924.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  925.     PORT_DIPSETTING(    0x08, "2" )
  926.     PORT_DIPSETTING(    0x0c, "3" )
  927.     PORT_DIPSETTING(    0x04, "4" )
  928.     PORT_DIPSETTING(    0x00, "5" )
  929.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  930.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  931.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  932.     PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) )
  933.     PORT_DIPSETTING(    0x40, "Easy" )
  934.     PORT_DIPSETTING(    0x60, "Normal" )
  935.     PORT_DIPSETTING(    0x20, "Hard" )
  936.     PORT_DIPSETTING(    0x00, "Hardest" )
  937.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
  938.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  939.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  940.  
  941.     PORT_START /* A 6 way dip switch */
  942.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  943.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  944.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  945.     PORT_DIPNAME( 0x0e, 0x0e, DEF_STR( Coinage ) )
  946.     PORT_DIPSETTING(    0x00, "A 3C/2C B 8C/1C" )
  947.     PORT_DIPSETTING(    0x09, "A 2C/3C B 7C/1C" )
  948.     PORT_DIPSETTING(    0x0e, "A 1C/1C B 1C/1C" )
  949.     PORT_DIPSETTING(    0x0c, "A 1C/2C B 2C/1C" )
  950.     PORT_DIPSETTING(    0x0a, "A 1C/3C B 3C/1C" )
  951.     PORT_DIPSETTING(    0x08, "A 1C/4C B 4C/1C" )
  952.     PORT_DIPSETTING(    0x04, "A 1C/5C B 5C/1C" )
  953.     PORT_DIPSETTING(    0x02, "A 1C/6C B 6C/1C" )
  954.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
  955.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  956.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  957.     PORT_DIPNAME( 0x20, 0x20, "Freeze" )
  958.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  959.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  960.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  961.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  962. INPUT_PORTS_END
  963.  
  964. INPUT_PORTS_START( gangwars )
  965.     PORT_START    /* Player 1 controls */
  966.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  967.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  968.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  969.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  970.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  971.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  972.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  973.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  974.  
  975.     PORT_START    /* Player 2 controls */
  976.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  977.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  978.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  979.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  980.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  981.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  982.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  983.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  984.  
  985.     PORT_START    /* Coin input to microcontroller */
  986.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  987.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  988.  
  989.     PORT_START    /* Service + dip */
  990.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  991.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  992.  
  993.     /* Dip 2: 6 way dip switch */
  994.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  995.     PORT_DIPSETTING(    0x08, "2" )
  996.     PORT_DIPSETTING(    0x0c, "3" )
  997.     PORT_DIPSETTING(    0x04, "4" )
  998.     PORT_DIPSETTING(    0x00, "5" )
  999.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  1000.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  1001.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1002.     PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) )
  1003.     PORT_DIPSETTING(    0x40, "Easy" )
  1004.     PORT_DIPSETTING(    0x60, "Normal" )
  1005.     PORT_DIPSETTING(    0x20, "Hard" )
  1006.     PORT_DIPSETTING(    0x00, "Hardest" )
  1007.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
  1008.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1009.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  1010.  
  1011.     PORT_START /* A 6 way dip switch */
  1012.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  1013.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1014.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1015.     PORT_DIPNAME( 0x0e, 0x0e, DEF_STR( Coinage ) )
  1016.     PORT_DIPSETTING(    0x00, "A 3C/2C B 8C/1C" )
  1017.     PORT_DIPSETTING(    0x09, "A 2C/3C B 7C/1C" )
  1018.     PORT_DIPSETTING(    0x0e, "A 1C/1C B 1C/1C" )
  1019.     PORT_DIPSETTING(    0x0c, "A 1C/2C B 2C/1C" )
  1020.     PORT_DIPSETTING(    0x0a, "A 1C/3C B 3C/1C" )
  1021.     PORT_DIPSETTING(    0x08, "A 1C/4C B 4C/1C" )
  1022.     PORT_DIPSETTING(    0x04, "A 1C/5C B 5C/1C" )
  1023.     PORT_DIPSETTING(    0x02, "A 1C/6C B 6C/1C" )
  1024.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
  1025.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  1026.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1027.     PORT_DIPNAME( 0x20, 0x20, "Freeze" )
  1028.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  1029.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1030.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1031.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1032. INPUT_PORTS_END
  1033.  
  1034. INPUT_PORTS_START( sbasebal )
  1035.     PORT_START    /* Player 1 controls */
  1036.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  1037.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  1038.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  1039.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  1040.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  1041.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  1042.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  1043.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  1044.  
  1045.     PORT_START    /* Player 2 controls */
  1046.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1047.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1048.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1049.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1050.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1051.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1052.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  1053.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
  1054.  
  1055.     PORT_START    /* Coin input to microcontroller */
  1056.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  1057.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  1058.  
  1059.     PORT_START    /* Service + dip */
  1060.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
  1061.     PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  1062.  
  1063.     /* Dip 2: 6 way dip switch */
  1064.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  1065.     PORT_DIPSETTING(    0x08, "2" )
  1066.     PORT_DIPSETTING(    0x0c, "3" )
  1067.     PORT_DIPSETTING(    0x04, "4" )
  1068.     PORT_DIPSETTING(    0x00, "5" )
  1069.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  1070.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  1071.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1072.     PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) )
  1073.     PORT_DIPSETTING(    0x40, "Easy" )
  1074.     PORT_DIPSETTING(    0x60, "Normal" )
  1075.     PORT_DIPSETTING(    0x20, "Hard" )
  1076.     PORT_DIPSETTING(    0x00, "Hardest" )
  1077.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
  1078.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1079.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  1080.  
  1081. /*
  1082.  
  1083.     PORT_DIPNAME( 0x20, 0x00, "Language" )
  1084.     PORT_DIPSETTING(    0x00, "English" )
  1085.     PORT_DIPSETTING(    0x20, "Japanese" )
  1086.     PORT_DIPNAME( 0x40, 0x40, "Manufacturer" )
  1087.     PORT_DIPSETTING(    0x40, "SNK" )
  1088.     PORT_DIPSETTING(    0x00, "Romstar" )
  1089.     PORT_DIPNAME( 0x80, 0x80, "Invincibility" )
  1090.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  1091.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1092.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Flip_Screen ) )
  1093.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  1094.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1095. */
  1096.  
  1097.     PORT_START /* A 6 way dip switch */
  1098.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1099.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1100.     PORT_DIPNAME( 0x20, 0x20, "Freeze" )
  1101.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  1102.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1103.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
  1104.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  1105.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1106.  
  1107.     PORT_DIPNAME( 0x0e, 0x0e, DEF_STR( Coinage ) )
  1108.     PORT_DIPSETTING(    0x00, "A 3C/2C B 8C/1C" )
  1109.     PORT_DIPSETTING(    0x09, "A 2C/3C B 7C/1C" )
  1110.     PORT_DIPSETTING(    0x0e, "A 1C/1C B 1C/1C" )
  1111.     PORT_DIPSETTING(    0x0c, "A 1C/2C B 2C/1C" )
  1112.     PORT_DIPSETTING(    0x0a, "A 1C/3C B 3C/1C" )
  1113.     PORT_DIPSETTING(    0x08, "A 1C/4C B 4C/1C" )
  1114.     PORT_DIPSETTING(    0x04, "A 1C/5C B 5C/1C" )
  1115.     PORT_DIPSETTING(    0x02, "A 1C/6C B 6C/1C" )
  1116.  
  1117.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  1118.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1119.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1120. INPUT_PORTS_END
  1121.  
  1122. /******************************************************************************/
  1123.  
  1124. static struct GfxLayout charlayout =
  1125. {
  1126.     8,8,    /* 8*8 chars */
  1127.     2048,
  1128.     4,        /* 4 bits per pixel  */
  1129.     { 0, 4, 0x8000*8, (0x8000*8)+4 },
  1130.     { 8*8+3, 8*8+2, 8*8+1, 8*8+0, 3, 2, 1, 0 },
  1131.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  1132.     16*8    /* every char takes 8 consecutive bytes */
  1133. };
  1134.  
  1135. /* You wouldn't believe how long it took me to figure this one out.. */
  1136. static struct GfxLayout charlayout_V =
  1137. {
  1138.     8,8,
  1139.     2048,
  1140.     4,    /* 4 bits per pixel */
  1141.     { 0,1,2,3 },
  1142.       { 16*8+4, 16*8+0, 24*8+4, 24*8+0, 4, 0, 8*8+4, 8*8+0 },
  1143.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  1144.     32*8    /* every sprite takes 16 consecutive bytes */
  1145. };
  1146.  
  1147. static struct GfxLayout spritelayout =
  1148. {
  1149.     16,16,    /* 16*16 sprites */
  1150.     4096*4,
  1151.     4,        /* 4 bits per pixel */
  1152.     { 0, 0x80000*8, 0x100000*8, 0x180000*8 },
  1153.     { 16*8+7, 16*8+6, 16*8+5, 16*8+4, 16*8+3, 16*8+2, 16*8+1, 16*8+0,
  1154.       7, 6, 5, 4, 3, 2, 1, 0 },
  1155.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  1156.       8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
  1157.     8*32    /* every sprite takes 32 consecutive bytes */
  1158. };
  1159.  
  1160. static struct GfxLayout spritelayout_V =
  1161. {
  1162.     16,16,    /* 16*16 sprites */
  1163.     0x5000,
  1164.     4,        /* 4 bits per pixel */
  1165.     { 0, 0xa0000*8, 0x140000*8, 0x1e0000*8 },
  1166.     { 16*8+7, 16*8+6, 16*8+5, 16*8+4, 16*8+3, 16*8+2, 16*8+1, 16*8+0,
  1167.       7, 6, 5, 4, 3, 2, 1, 0 },
  1168.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  1169.       8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
  1170.     8*32    /* every sprite takes 32 consecutive bytes */
  1171. };
  1172.  
  1173. static struct GfxLayout paddle_layout =
  1174. {
  1175.     8,8,    /* 8*8 chars */
  1176.     0x4000,
  1177.     4,    /* 4 bits per pixel */
  1178.     {
  1179. //0x40000*8+4, 0x40000*8+0,4, 0,
  1180. //0x40000*8+4, 4,0x40000*8+0, 0,
  1181. // 4,0x40000*8+4,0,  0x40000*8+0,
  1182.  4,0,0x40000*8+4,  0x40000*8+0,
  1183. //0x40000*8+0,0x40000*8+4,    0,4,
  1184.  
  1185.    },
  1186.     { 8*8+3, 8*8+2, 8*8+1, 8*8+0, 3, 2, 1, 0 },
  1187.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  1188.     16*8    /* every char takes 16 consecutive bytes */
  1189. };
  1190.  
  1191. static struct GfxLayout sting_layout1 =
  1192. {
  1193.     8,8,    /* 8*8 chars */
  1194.     2048,
  1195.     3,    /* 3 bits per pixel */
  1196.     { 4, 4+(0x8000*8), 0+(0x10000*4) },
  1197.     { 8*8+3, 8*8+2, 8*8+1, 8*8+0, 3, 2, 1, 0 },
  1198.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  1199.     16*8    /* every char takes 16 consecutive bytes */
  1200. };
  1201.  
  1202. static struct GfxLayout sting_layout2 =
  1203. {
  1204.     8,8,    /* 8*8 chars */
  1205.     2048,
  1206.     3,    /* 3 bits per pixel */
  1207.     { 0, 0+(0x28000*8), 4+(0x28000*8) },
  1208.     { 8*8+3, 8*8+2, 8*8+1, 8*8+0, 3, 2, 1, 0 },
  1209.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  1210.     16*8    /* every char takes 16 consecutive bytes */
  1211. };
  1212.  
  1213. static struct GfxLayout sting_layout3 =
  1214. {
  1215.     8,8,    /* 8*8 chars */
  1216.     2048,
  1217.     3,    /* 3 bits per pixel */
  1218.     { 0, 0+(0x10000*8), 4+(0x10000*8) },
  1219.     { 8*8+3, 8*8+2, 8*8+1, 8*8+0, 3, 2, 1, 0 },
  1220.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  1221.     16*8    /* every char takes 16 consecutive bytes */
  1222. };
  1223.  
  1224. static struct GfxLayout kyros_char_layout1 =
  1225. {
  1226.     8,8,    /* 8*8 chars */
  1227.     0x8000/16,
  1228.     3,    /* 3 bits per pixel */
  1229.     { 4,0x8000*8,0x8000*8+4 },
  1230.     { 8*8+3, 8*8+2, 8*8+1, 8*8+0, 3, 2, 1, 0 },
  1231.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  1232.     16*8    /* every char takes 16 consecutive bytes */
  1233. };
  1234.  
  1235. static struct GfxLayout kyros_char_layout2 =
  1236. {
  1237.     8,8,    /* 8*8 chars */
  1238.     0x8000/16,
  1239.     3,    /* 3 bits per pixel */
  1240.     { 0,0x10000*8,0x10000*8+4 },
  1241.     { 8*8+3, 8*8+2, 8*8+1, 8*8+0, 3, 2, 1, 0 },
  1242.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  1243.     16*8    /* every char takes 16 consecutive bytes */
  1244. };
  1245.  
  1246. static struct GfxLayout kouyakyu_layout0 =
  1247. {
  1248.     8,8,
  1249.     256,
  1250.     2,    /* 2 bits per pixel */
  1251.     { 0, 4 },
  1252.       { 8*8+3, 8*8+2, 8*8+1, 8*8, 3, 2, 1, 0 },
  1253.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  1254.     16*8    /* every sprite takes 16 consecutive bytes */
  1255. };
  1256.  
  1257. static struct GfxLayout kouyakyu_layout1 =
  1258. {
  1259.     16,16,
  1260.     1024,
  1261.     2,
  1262.     { 0, 4, 0x10000*8 },
  1263.        { 16*8+3, 16*8+2, 16*8+1, 16*8+0, 32*8+3, 32*8+2 ,32*8+1 ,32*8+0,
  1264.       48*8+3 ,48*8+2 ,48*8+1 ,48*8+0, 3, 2, 1, 0
  1265.     },
  1266.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8  },
  1267.     64*8
  1268. };
  1269.  
  1270. static struct GfxLayout kouyakyu_layout2 =
  1271. {
  1272.     16,16,
  1273.     1024,
  1274.     2,
  1275.     { 0, 4, 0x10000*8+4 },
  1276.        { 16*8+3, 16*8+2, 16*8+1, 16*8+0, 32*8+3, 32*8+2 ,32*8+1 ,32*8+0,
  1277.       48*8+3 ,48*8+2 ,48*8+1 ,48*8+0, 3, 2, 1, 0
  1278.     },
  1279.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8  },
  1280.     64*8
  1281. };
  1282.  
  1283. /******************************************************************************/
  1284.  
  1285. static struct GfxDecodeInfo alpha68k_II_gfxdecodeinfo[] =
  1286. {
  1287.     { REGION_GFX1, 0, &charlayout,   0,  16 },
  1288.     { REGION_GFX2, 0, &spritelayout, 0, 128 },
  1289.     { -1 } /* end of array */
  1290. };
  1291.  
  1292. static struct GfxDecodeInfo alpha68k_V_gfxdecodeinfo[] =
  1293. {
  1294.     { REGION_GFX1, 0, &charlayout_V,    0,  16 },
  1295.     { REGION_GFX2, 0, &spritelayout_V,  0, 256 },
  1296.     { -1 } /* end of array */
  1297. };
  1298.  
  1299. static struct GfxDecodeInfo paddle_gfxdecodeinfo[] =
  1300. {
  1301.     { REGION_GFX1, 0, &paddle_layout,  0, 128 },
  1302.     { -1 } /* end of array */
  1303. };
  1304.  
  1305. static struct GfxDecodeInfo sstingry_gfxdecodeinfo[] =
  1306. {
  1307.     { REGION_GFX1, 0x00000, &sting_layout1,  0, 256 },
  1308.      { REGION_GFX1, 0x00000, &sting_layout2,  0, 256 },
  1309.     { REGION_GFX1, 0x10000, &sting_layout1,  0, 256 },
  1310.     { REGION_GFX1, 0x10000, &sting_layout3,  0, 256 },
  1311.     { -1 } /* end of array */
  1312. };
  1313.  
  1314. static struct GfxDecodeInfo kyros_gfxdecodeinfo[] =
  1315. {
  1316.     { REGION_GFX1, 0x00000, &kyros_char_layout1,  0, 32 },
  1317.     { REGION_GFX1, 0x00000, &kyros_char_layout2,  0, 32 },
  1318.     { REGION_GFX1, 0x18000, &kyros_char_layout1,  0, 32 },
  1319.     { REGION_GFX1, 0x18000, &kyros_char_layout2,  0, 32 },
  1320.     { REGION_GFX1, 0x30000, &kyros_char_layout1,  0, 32 },
  1321.     { REGION_GFX1, 0x30000, &kyros_char_layout2,  0, 32 },
  1322.     { REGION_GFX1, 0x48000, &kyros_char_layout1,  0, 32 },
  1323.     { REGION_GFX1, 0x48000, &kyros_char_layout2,  0, 32 },
  1324.     { -1 } /* end of array */
  1325. };
  1326.  
  1327. static struct GfxDecodeInfo kouyakyu_gfxdecodeinfo[] =
  1328. {
  1329.     { REGION_GFX1, 0x000000, &kouyakyu_layout0,  0, 256 },
  1330.     { REGION_GFX2, 0x000000, &kouyakyu_layout1,  0, 256 },
  1331.      { REGION_GFX2, 0x000000, &kouyakyu_layout2,  0, 256 },
  1332.     { -1 } /* end of array */
  1333. };
  1334.  
  1335. /******************************************************************************/
  1336.  
  1337. static struct YM2413interface ym2413_interface=
  1338. {
  1339.     1,
  1340.     8000000,    /* ??? */
  1341.     { 50 },
  1342. };
  1343.  
  1344. static struct YM2203interface ym2203_interface =
  1345. {
  1346.     1,
  1347.     3000000,    /* ??? */
  1348.     { YM2203_VOL(65,65) },
  1349.     { 0 },
  1350.     { 0 },
  1351.     { 0 },
  1352.     { 0 },
  1353.     { 0 }
  1354. };
  1355.  
  1356. static struct AY8910interface ay8910_interface =
  1357. {
  1358.     2, /* 2 chips */
  1359.     1500000,
  1360.     { 60, 60 },
  1361.     { 0 },
  1362.     { 0 },
  1363.     { 0 },
  1364.     { 0 }
  1365. };
  1366.  
  1367. static struct DACinterface dac_interface =
  1368. {
  1369.     1,
  1370.     { 100 }
  1371. };
  1372.  
  1373. static int kyros_interrupt(void)
  1374. {
  1375.     if (cpu_getiloops() == 0)
  1376.         return 1;
  1377.     return 2;
  1378. }
  1379.  
  1380. /******************************************************************************/
  1381.  
  1382.  
  1383. static struct MachineDriver machine_driver_kouyakyu =
  1384. {
  1385.     {
  1386.          {
  1387.             CPU_M68000,
  1388.             6000000, /* 12MHz/2? */
  1389.             kouyakyu_readmem,kouyakyu_writemem,0,0,
  1390.             kyros_interrupt,2
  1391.         },
  1392. #if 0
  1393.         {
  1394.             CPU_Z80 | CPU_AUDIO_CPU,
  1395.             3579545, /* ? */
  1396.             sound_readmem,sound_writemem,sound_readport,sound_writeport,
  1397.             interrupt,1
  1398.         }
  1399. #endif
  1400.     },
  1401.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1402.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  1403.     0,
  1404.  
  1405.     /* video hardware */
  1406.       32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  1407.  //     64*8, 64*8, { 0*8, 64*8-1, 2*8, 64*8-1 },
  1408.  
  1409.     kouyakyu_gfxdecodeinfo,
  1410.     256, 256,
  1411.     0,
  1412.  
  1413.     VIDEO_TYPE_RASTER,
  1414.     0,
  1415.     kouyakyu_vh_start,
  1416.     0,
  1417.     kouyakyu_vh_screenrefresh,
  1418.  
  1419.     /* sound hardware */
  1420.     0,0,0,0,
  1421.     {
  1422.         {
  1423.             SOUND_YM2203,
  1424.             &ym2203_interface
  1425.         }
  1426.     }
  1427. };
  1428.  
  1429. static struct MachineDriver machine_driver_kyros =
  1430. {
  1431.     /* basic machine hardware */
  1432.     {
  1433.          {
  1434.             CPU_M68000,
  1435.             6000000, /* 24MHz/4? */
  1436.             kyros_readmem,kyros_writemem,0,0,
  1437.             kyros_interrupt,2
  1438.         },
  1439.         {
  1440.             CPU_Z80 | CPU_AUDIO_CPU,
  1441.             3579545, /* ? */
  1442.             kyros_sound_readmem,kyros_sound_writemem,0,kyros_sound_writeport,
  1443.             nmi_interrupt,8
  1444.         }
  1445.     },
  1446.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1447.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  1448.     0,
  1449.  
  1450.     /* video hardware */
  1451.       32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  1452.  
  1453.     kyros_gfxdecodeinfo,
  1454.     256, 256,
  1455.     kyros_vh_convert_color_prom,
  1456.  
  1457.     VIDEO_TYPE_RASTER,
  1458.     0,
  1459.     0,
  1460.     0,
  1461.     kyros_vh_screenrefresh,
  1462.  
  1463.     /* sound hardware */
  1464.     0,0,0,0,
  1465.     {
  1466.         {
  1467.             SOUND_YM2203,
  1468.             &ym2203_interface
  1469.         },
  1470.         {
  1471.             SOUND_AY8910,
  1472.             &ay8910_interface
  1473.         }
  1474.     }
  1475. };
  1476.  
  1477. static struct MachineDriver machine_driver_sstingry =
  1478. {
  1479.     /* basic machine hardware */
  1480.     {
  1481.          {
  1482.             CPU_M68000,
  1483.             6000000, /* 24MHz/4? */
  1484.             kyros_readmem,kyros_writemem,0,0,
  1485.             kyros_interrupt,2
  1486.         },
  1487.         {
  1488.             CPU_Z80 | CPU_AUDIO_CPU,
  1489.             3579545, /* ? */
  1490.             sstingry_sound_readmem,sstingry_sound_writemem,0,kyros_sound_writeport,
  1491.             nmi_interrupt,32
  1492.         }
  1493.     },
  1494.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1495.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  1496.     0,
  1497.  
  1498.     /* video hardware */
  1499.       32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  1500.  
  1501.     sstingry_gfxdecodeinfo,
  1502.     256, 256,
  1503.     alpha68k_I_vh_convert_color_prom,
  1504.  
  1505.     VIDEO_TYPE_RASTER,
  1506.     0,
  1507.     0,
  1508.     0,
  1509.     sstingry_vh_screenrefresh,
  1510.  
  1511.     /* sound hardware */
  1512.     0,0,0,0,
  1513.     {
  1514.         {
  1515.             SOUND_YM2203,
  1516.             &ym2203_interface
  1517.         },
  1518.         {
  1519.             SOUND_AY8910,
  1520.             &ay8910_interface
  1521.         }
  1522.     }
  1523. };
  1524.  
  1525. static struct MachineDriver machine_driver_alpha68k_I =
  1526. {
  1527.     /* basic machine hardware */
  1528.     {
  1529.          {
  1530.             CPU_M68000,
  1531.             6000000, /* 24MHz/4? */
  1532.             alpha68k_I_readmem,alpha68k_I_writemem,0,0,
  1533.             m68_level1_irq,1 /* VBL */
  1534.         },
  1535.         {
  1536.             CPU_Z80 | CPU_AUDIO_CPU,
  1537.             3579545, /* ? */
  1538.             sound_readmem,sound_writemem,sound_readport,sound_writeport,
  1539.             interrupt,1
  1540.         }
  1541.     },
  1542.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1543.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  1544.     0,
  1545.  
  1546.     /* video hardware */
  1547.       32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  1548.  
  1549.     paddle_gfxdecodeinfo,
  1550.     256, 256,
  1551.     alpha68k_I_vh_convert_color_prom,
  1552.  
  1553.     VIDEO_TYPE_RASTER,
  1554.     0,
  1555.     0,
  1556.     0,
  1557.     alpha68k_I_vh_screenrefresh,
  1558.  
  1559.     /* sound hardware */
  1560.     0,0,0,0,
  1561.     {
  1562.         {
  1563.             SOUND_YM2203,
  1564.             &ym2203_interface
  1565.         }
  1566.     }
  1567. };
  1568.  
  1569. static struct MachineDriver machine_driver_alpha68k_II =
  1570. {
  1571.     /* basic machine hardware */
  1572.     {
  1573.         {
  1574.             CPU_M68000,
  1575.             8000000, /* Correct */
  1576.             alpha68k_II_readmem,alpha68k_II_writemem,0,0,
  1577.             m68_level3_irq,1 /* VBL */
  1578.         },
  1579.         {
  1580.             CPU_Z80 | CPU_AUDIO_CPU,
  1581.             //3579545, /* Correct?? */
  1582.             3579545*2, /* Unlikely but needed to stop nested NMI's */
  1583.             sound_readmem,sound_writemem,sound_readport,sound_writeport,
  1584.             nmi_interrupt,116
  1585.         }
  1586.     },
  1587.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1588.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  1589.     0,
  1590.  
  1591.     /* video hardware */
  1592.       32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  1593.  
  1594.     alpha68k_II_gfxdecodeinfo,
  1595.     2048, 2048,
  1596.     0,
  1597.  
  1598.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1599.     0,
  1600.     alpha68k_vh_start,
  1601.     0,
  1602.     alpha68k_II_vh_screenrefresh,
  1603.  
  1604.     /* sound hardware */
  1605.     0,0,0,0,
  1606.     {
  1607.         {
  1608.             SOUND_YM2203,
  1609.             &ym2203_interface
  1610.         },
  1611.         {
  1612.             SOUND_YM2413,
  1613.             &ym2413_interface
  1614.         },
  1615.         {
  1616.             SOUND_DAC,
  1617.             &dac_interface
  1618.         }
  1619.     }
  1620. };
  1621.  
  1622. static struct MachineDriver machine_driver_alpha68k_V =
  1623. {
  1624.     /* basic machine hardware */
  1625.     {
  1626.          {
  1627.             CPU_M68000,
  1628.             10000000, /* ? */
  1629.             alpha68k_V_readmem,alpha68k_V_writemem,0,0,
  1630.             m68_level3_irq,1 /* VBL */
  1631.         },
  1632.         {
  1633.             CPU_Z80 | CPU_AUDIO_CPU,
  1634. //            3579545,
  1635.             3579545*2, /* Unlikely but needed to stop nested NMI's */
  1636.             sound_readmem,sound_writemem,sound_readport,sound_writeport,
  1637.             nmi_interrupt,148
  1638.         }
  1639.     },
  1640.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1641.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  1642.     0,
  1643.  
  1644.     /* video hardware */
  1645.       32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  1646.  
  1647.     alpha68k_V_gfxdecodeinfo,
  1648.     4096, 4096,
  1649.     0,
  1650.  
  1651.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1652.     0,
  1653.     alpha68k_vh_start,
  1654.     0,
  1655.     alpha68k_V_vh_screenrefresh,
  1656.  
  1657.     /* sound hardware */
  1658.     0,0,0,0,
  1659.     {
  1660.         {
  1661.             SOUND_YM2203,
  1662.             &ym2203_interface
  1663.         },
  1664.         {
  1665.             SOUND_YM2413,
  1666.             &ym2413_interface
  1667.         },
  1668.         {
  1669.             SOUND_DAC,
  1670.             &dac_interface
  1671.         }
  1672.     }
  1673. };
  1674.  
  1675. static struct MachineDriver machine_driver_alpha68k_V_sb =
  1676. {
  1677.     /* basic machine hardware */
  1678.     {
  1679.          {
  1680.             CPU_M68000,
  1681.             10000000, /* ? */
  1682.             alpha68k_V_readmem,alpha68k_V_writemem,0,0,
  1683.             m68_level3_irq,1 /* VBL */
  1684.         },
  1685.         {
  1686.             CPU_Z80 | CPU_AUDIO_CPU,
  1687. //            3579545,
  1688.             3579545*2, /* Unlikely but needed to stop nested NMI's */
  1689.             sound_readmem,sound_writemem,sound_readport,sound_writeport,
  1690.             nmi_interrupt,112
  1691.         }
  1692.     },
  1693.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1694.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  1695.     0,
  1696.  
  1697.     /* video hardware */
  1698.       32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  1699.  
  1700.     alpha68k_V_gfxdecodeinfo,
  1701.     4096, 4096,
  1702.     0,
  1703.  
  1704.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1705.     0,
  1706.     alpha68k_vh_start,
  1707.     0,
  1708.     alpha68k_V_sb_vh_screenrefresh,
  1709.  
  1710.     /* sound hardware */
  1711.     0,0,0,0,
  1712.     {
  1713.         {
  1714.             SOUND_YM2203,
  1715.             &ym2203_interface
  1716.         },
  1717.         {
  1718.             SOUND_YM2413,
  1719.             &ym2413_interface
  1720.         },
  1721.         {
  1722.             SOUND_DAC,
  1723.             &dac_interface
  1724.         }
  1725.     }
  1726. };
  1727.  
  1728. /******************************************************************************/
  1729.  
  1730. ROM_START( kouyakyu )
  1731.     ROM_REGION( 0x10000, REGION_CPU1 ) /* 68000 code */
  1732.     ROM_LOAD_ODD ( "epr-6704.bin",  0x00000, 0x2000, 0xc7ac2292 )
  1733.     ROM_LOAD_EVEN( "epr-6707.bin",  0x00000, 0x2000, 0x9cb2962e )
  1734.     ROM_LOAD_ODD ( "epr-6705.bin",  0x04000, 0x2000, 0x985327cb )
  1735.     ROM_LOAD_EVEN( "epr-6708.bin",  0x04000, 0x2000, 0xf8863dc5 )
  1736.     ROM_LOAD_ODD ( "epr-6706.bin",  0x08000, 0x2000, 0x053a74f6 )
  1737.     ROM_LOAD_EVEN( "epr-6709.bin",  0x08000, 0x2000, 0xf41cb58c )
  1738.  
  1739.     ROM_REGION( 0x1000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1740.     ROM_LOAD( "epr-6710.bin", 0x000000, 0x1000, 0xaccda190 ) /* Chars */
  1741.  
  1742.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1743.     ROM_LOAD( "epr-6686.bin", 0x000000, 0x2000, 0x3d9e516f ) /* Tiles plane 1 & 2 */
  1744.     ROM_LOAD( "epr-6687.bin", 0x002000, 0x2000, 0x9c1f49df )
  1745.     ROM_LOAD( "epr-6688.bin", 0x004000, 0x2000, 0xceb76c5b )
  1746.     ROM_LOAD( "epr-6689.bin", 0x006000, 0x2000, 0x53bf7587 )
  1747.     ROM_LOAD( "epr-6690.bin", 0x008000, 0x2000, 0xa142a11d )
  1748.     ROM_LOAD( "epr-6691.bin", 0x00a000, 0x2000, 0xb640568c )
  1749.     ROM_LOAD( "epr-6692.bin", 0x00c000, 0x2000, 0xb91d8172 )
  1750.     ROM_LOAD( "epr-6693.bin", 0x00e000, 0x2000, 0x874e3acc )
  1751.  
  1752.     ROM_LOAD( "epr-6694.bin", 0x010000, 0x2000, 0x51a7345e ) /* Tiles plane 3 */
  1753.     ROM_LOAD( "epr-6695.bin", 0x012000, 0x2000, 0x22bea465 )
  1754.     ROM_LOAD( "epr-6696.bin", 0x014000, 0x2000, 0x0625f48e )
  1755.     ROM_LOAD( "epr-6697.bin", 0x016000, 0x2000, 0xf18afabe )
  1756.  
  1757.     ROM_REGION( 0x10000, REGION_CPU2 )      /* sound cpu */
  1758.     ROM_LOAD( "epr-6698.bin", 0x000000, 0x2000, 0x7adfd1ff )
  1759.     ROM_LOAD( "epr-6699.bin", 0x002000, 0x2000, 0x9bfa4a72 )
  1760.     ROM_LOAD( "epr-6700.bin", 0x004000, 0x2000, 0xee579266 )
  1761.     ROM_LOAD( "epr-6701.bin", 0x006000, 0x2000, 0x3c83588a )
  1762.     ROM_LOAD( "epr-6702.bin", 0x008000, 0x2000, 0x27ddf031 )
  1763.     ROM_LOAD( "epr-6703.bin", 0x00a000, 0x2000, 0xfbff3a86 )
  1764.  
  1765.     ROM_REGION( 0x0420, REGION_PROMS )
  1766.     ROM_LOAD( "pr6627.bpr",  0x000000, 0x100, 0x5ec5480d )
  1767.     ROM_LOAD( "pr6628.bpr",  0x000100, 0x100, 0x8af247a4 )
  1768.     ROM_LOAD( "pr6629.bpr",  0x000200, 0x100, 0x29c7a393 )
  1769.     ROM_LOAD( "pr6630a.bpr", 0x000300, 0x100, 0xd6e202da ) /* Same as pr6630b,c,d */
  1770.     ROM_LOAD( "pr.bpr",      0x000400, 0x020, 0x33b98466 )
  1771. ROM_END
  1772.  
  1773. ROM_START( sstingry )
  1774.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 68000 code */
  1775.     ROM_LOAD_EVEN( "ss_05.rom",  0x0000,  0x4000, 0xbfb28d53 )
  1776.     ROM_LOAD_ODD ( "ss_07.rom",  0x0000,  0x4000, 0xeb1b65c5 )
  1777.     ROM_LOAD_EVEN( "ss_04.rom",  0x8000,  0x4000, 0x2e477a79 )
  1778.     ROM_LOAD_ODD ( "ss_06.rom",  0x8000,  0x4000, 0x597620cb )
  1779.  
  1780.     ROM_REGION( 0x10000, REGION_CPU2 )      /* sound cpu */
  1781.     ROM_LOAD( "ss_01.rom",       0x0000,  0x4000, 0xfef09a92 )
  1782.     ROM_LOAD( "ss_02.rom",       0x4000,  0x4000, 0xab4e8c01 )
  1783.  
  1784.     ROM_REGION( 0x60000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1785.     ROM_LOAD( "ss_12.rom",       0x00000, 0x4000, 0x74caa9e9 )
  1786.     ROM_LOAD( "ss_08.rom",       0x08000, 0x4000, 0x32368925 )
  1787.     ROM_LOAD( "ss_13.rom",       0x10000, 0x4000, 0x13da6203 )
  1788.     ROM_LOAD( "ss_10.rom",       0x18000, 0x4000, 0x2903234a )
  1789.     ROM_LOAD( "ss_11.rom",       0x20000, 0x4000, 0xd134302e )
  1790.     ROM_LOAD( "ss_09.rom",       0x28000, 0x4000, 0x6f9d938a )
  1791.  
  1792.     ROM_REGION( 0x0300, REGION_PROMS )
  1793.     ROM_LOAD( "ic92",            0x0000, 0x0100, 0xe7ce1179 )
  1794.     ROM_LOAD( "ic91",            0x0100, 0x0100, 0xc3965079 )
  1795.     ROM_LOAD( "ic93",            0x0200, 0x0100, 0x9af8a375 )
  1796. ROM_END
  1797.  
  1798. ROM_START( kyros )
  1799.     ROM_REGION( 0x20000, REGION_CPU1 )
  1800.     ROM_LOAD_EVEN( "2.10c", 0x00000,  0x4000, 0x4bd030b1 )
  1801.     ROM_CONTINUE (          0x10000, 0x4000 | ROMFLAG_ALTERNATE )
  1802.     ROM_LOAD_ODD ( "1.13c", 0x00000,  0x4000, 0x75cfbc5e )
  1803.     ROM_CONTINUE (          0x10001, 0x4000 | ROMFLAG_ALTERNATE )
  1804.     ROM_LOAD_EVEN( "4.10b", 0x08000,  0x4000, 0xbe2626c2 )
  1805.     ROM_CONTINUE (          0x18000, 0x4000 | ROMFLAG_ALTERNATE )
  1806.     ROM_LOAD_ODD ( "3.13b", 0x08001,  0x4000, 0xfb25e71a )
  1807.     ROM_CONTINUE (          0x18001, 0x4000 | ROMFLAG_ALTERNATE )
  1808.  
  1809.     ROM_REGION( 0x20000, REGION_CPU2 )    /* Sound CPU */
  1810.     ROM_LOAD( "2s.1f",      0x00000, 0x4000, 0x800ceb27 )
  1811.     ROM_LOAD( "1s.1d",      0x10000, 0x8000, 0x87d3e719 ) /* todo */
  1812.     ROM_LOAD( "0.1t",       0x18000, 0x2000, 0x5d0acb4c ) /* todo */
  1813.  
  1814.     ROM_REGION( 0x60000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1815.     ROM_LOAD( "8.9pr",      0x00000, 0x8000, 0xc5290944 )
  1816.     ROM_LOAD( "11.11m",     0x08000, 0x8000, 0xfbd44f1e )
  1817.     ROM_LOAD( "12.11n",        0x10000, 0x8000, 0x10fed501 )
  1818.     ROM_LOAD( "9.9s",        0x18000, 0x8000, 0xdd40ca33 )
  1819.     ROM_LOAD( "13.11p",        0x20000, 0x8000, 0xe6a02030 )
  1820.     ROM_LOAD( "14.11r",        0x28000, 0x8000, 0x722ad23a )
  1821.     ROM_LOAD( "15.3t",        0x30000, 0x8000, 0x045fdda4 )
  1822.     ROM_LOAD( "17.7t",        0x38000, 0x8000, 0x7618ec00 )
  1823.     ROM_LOAD( "18.9t",        0x40000, 0x8000, 0x0ee74171 )
  1824.     ROM_LOAD( "16.5t",        0x48000, 0x8000, 0x2cf14824 )
  1825.     ROM_LOAD( "19.11t",        0x50000, 0x8000, 0x4f336306 )
  1826.     ROM_LOAD( "20.13t",        0x58000, 0x8000, 0xa165d06b )
  1827.  
  1828.     ROM_REGION( 0x0500, REGION_PROMS )
  1829.     ROM_LOAD( "mb7114l.5r", 0x000, 0x100, 0x3628bf36 )
  1830.     ROM_LOAD( "mb7114l.4r", 0x100, 0x100, 0x850704e4 )
  1831.     ROM_LOAD( "mb7114l.6r", 0x200, 0x100, 0xa54f60d7 )
  1832.     ROM_LOAD( "mb7114l.5p", 0x300, 0x100, 0x1cc53765 )
  1833.     ROM_LOAD( "mb7114l.6p", 0x400, 0x100, 0xb0d6971f )
  1834. ROM_END
  1835.  
  1836. ROM_START( paddlema )
  1837.     ROM_REGION( 0x40000, REGION_CPU1 )
  1838.     ROM_LOAD_EVEN( "padlem.6g",  0x00000, 0x10000, 0xc227a6e8 )
  1839.     ROM_LOAD_ODD ( "padlem.3g",  0x00000, 0x10000, 0xf11a21aa )
  1840.     ROM_LOAD_EVEN( "padlem.6h",  0x20000, 0x10000, 0x8897555f )
  1841.     ROM_LOAD_ODD ( "padlem.3h",  0x20000, 0x10000, 0xf0fe9b9d )
  1842.  
  1843.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound CPU */
  1844.     ROM_LOAD( "padlem.18c", 0x000000, 0x10000, 0x9269778d )
  1845.  
  1846.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1847.     ROM_LOAD( "padlem.16m",      0x00000, 0x10000, 0x0984fb4d )
  1848.     ROM_LOAD( "padlem.16n",      0x10000, 0x10000, 0x4249e047 )
  1849.     ROM_LOAD( "padlem.13m",      0x20000, 0x10000, 0xfd9dbc27 )
  1850.     ROM_LOAD( "padlem.13n",      0x30000, 0x10000, 0x1d460486 )
  1851.     ROM_LOAD( "padlem.9m",       0x40000, 0x10000, 0x4ee4970d )
  1852.     ROM_LOAD( "padlem.9n",       0x50000, 0x10000, 0xa1756f15 )
  1853.     ROM_LOAD( "padlem.6m",       0x60000, 0x10000, 0x3f47910c )
  1854.     ROM_LOAD( "padlem.6n",       0x70000, 0x10000, 0xfe337655 )
  1855.  
  1856.     ROM_REGION( 0x8000, REGION_SOUND1 )    /* ADPCM samples? */
  1857.     ROM_LOAD( "padlem.18n",      0x0000,  0x8000,  0x06506200 )
  1858.  
  1859.     ROM_REGION( 0x0300, REGION_PROMS )
  1860.     ROM_LOAD( "padlem.a",        0x0000,  0x0100,  0xcae6bcd6 )
  1861.     ROM_LOAD( "padlem.b",        0x0100,  0x0100,  0xb6df8dcb )
  1862.     ROM_LOAD( "padlem.c",        0x0200,  0x0100,  0x39ca9b86 )
  1863. ROM_END
  1864.  
  1865. ROM_START( timesold )
  1866.     ROM_REGION( 0x40000, REGION_CPU1 )
  1867.     ROM_LOAD_EVEN( "bf.3",       0x00000,  0x10000, 0xa491e533 )
  1868.     ROM_LOAD_ODD ( "bf.4",       0x00000,  0x10000, 0x34ebaccc )
  1869.     ROM_LOAD_EVEN( "bf.1",       0x20000,  0x10000, 0x158f4cb3 )
  1870.     ROM_LOAD_ODD ( "bf.2",       0x20000,  0x10000, 0xaf01a718 )
  1871.  
  1872.     ROM_REGION( 0x80000, REGION_CPU2 )    /* Sound CPU */
  1873.     ROM_LOAD( "bf.7",            0x00000,  0x08000, 0xf8b293b5 )
  1874.     ROM_CONTINUE(                0x18000,  0x08000 )
  1875.     ROM_LOAD( "bf.8",            0x30000,  0x10000, 0x8a43497b )
  1876.     ROM_LOAD( "bf.9",            0x50000,  0x10000, 0x1408416f )
  1877.  
  1878.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  1879.     ROM_LOAD( "bf.5",            0x00000,  0x08000, 0x3cec2f55 )
  1880.     ROM_LOAD( "bf.6",            0x08000,  0x08000, 0x086a364d )
  1881.  
  1882.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1883.     ROM_LOAD( "bf.10",           0x000000, 0x20000, 0x613313ba )
  1884.     ROM_LOAD( "bf.14",           0x020000, 0x20000, 0xefda5c45 )
  1885.     ROM_LOAD( "bf.18",           0x040000, 0x20000, 0xe886146a )
  1886.     ROM_LOAD( "bf.11",           0x080000, 0x20000, 0x92b42eba )
  1887.     ROM_LOAD( "bf.15",           0x0a0000, 0x20000, 0xba3b9f5a )
  1888.     ROM_LOAD( "bf.19",           0x0c0000, 0x20000, 0x8994bf10 )
  1889.     ROM_LOAD( "bf.12",           0x100000, 0x20000, 0x7ca8bb32 )
  1890.     ROM_LOAD( "bf.16",           0x120000, 0x20000, 0x2aa74125 )
  1891.     ROM_LOAD( "bf.20",           0x140000, 0x20000, 0xbab6a7c5 )
  1892.     ROM_LOAD( "bf.13",           0x180000, 0x20000, 0x56a3a26a )
  1893.     ROM_LOAD( "bf.17",           0x1a0000, 0x20000, 0x6b37d048 )
  1894.     ROM_LOAD( "bf.21",           0x1c0000, 0x20000, 0xbc3b3944 )
  1895. ROM_END
  1896.  
  1897. ROM_START( timesol1 )
  1898.     ROM_REGION( 0x40000, REGION_CPU1 )
  1899.     ROM_LOAD_EVEN( "3",          0x00000,  0x10000, 0xbc069a29 )
  1900.     ROM_LOAD_ODD ( "4",          0x00000,  0x10000, 0xac7dca56 )
  1901.     ROM_LOAD_EVEN( "bf.1",       0x20000,  0x10000, 0x158f4cb3 )
  1902.     ROM_LOAD_ODD ( "bf.2",       0x20000,  0x10000, 0xaf01a718 )
  1903.  
  1904.     ROM_REGION( 0x80000, REGION_CPU2 )    /* Sound CPU */
  1905.     ROM_LOAD( "bf.7",            0x00000,  0x08000, 0xf8b293b5 )
  1906.     ROM_CONTINUE(                0x18000,  0x08000 )
  1907.     ROM_LOAD( "bf.8",            0x30000,  0x10000, 0x8a43497b )
  1908.     ROM_LOAD( "bf.9",            0x50000,  0x10000, 0x1408416f )
  1909.  
  1910.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  1911.     ROM_LOAD( "bf.5",            0x00000,  0x08000, 0x3cec2f55 )
  1912.     ROM_LOAD( "bf.6",            0x08000,  0x08000, 0x086a364d )
  1913.  
  1914.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1915.     ROM_LOAD( "bf.10",           0x000000, 0x20000, 0x613313ba )
  1916.     ROM_LOAD( "bf.14",           0x020000, 0x20000, 0xefda5c45 )
  1917.     ROM_LOAD( "bf.18",           0x040000, 0x20000, 0xe886146a )
  1918.     ROM_LOAD( "bf.11",           0x080000, 0x20000, 0x92b42eba )
  1919.     ROM_LOAD( "bf.15",           0x0a0000, 0x20000, 0xba3b9f5a )
  1920.     ROM_LOAD( "bf.19",           0x0c0000, 0x20000, 0x8994bf10 )
  1921.     ROM_LOAD( "bf.12",           0x100000, 0x20000, 0x7ca8bb32 )
  1922.     ROM_LOAD( "bf.16",           0x120000, 0x20000, 0x2aa74125 )
  1923.     ROM_LOAD( "bf.20",           0x140000, 0x20000, 0xbab6a7c5 )
  1924.     ROM_LOAD( "bf.13",           0x180000, 0x20000, 0x56a3a26a )
  1925.     ROM_LOAD( "bf.17",           0x1a0000, 0x20000, 0x6b37d048 )
  1926.     ROM_LOAD( "bf.21",           0x1c0000, 0x20000, 0xbc3b3944 )
  1927. ROM_END
  1928.  
  1929. ROM_START( btlfield )
  1930.     ROM_REGION( 0x40000, REGION_CPU1 )
  1931.     ROM_LOAD_EVEN( "bfv1_03.bin", 0x00000, 0x10000, 0x8720af0d )
  1932.     ROM_LOAD_ODD ( "bfv1_04.bin", 0x00000, 0x10000, 0x7dcccbe6 )
  1933.     ROM_LOAD_EVEN( "bf.1",        0x20000, 0x10000, 0x158f4cb3 )
  1934.     ROM_LOAD_ODD ( "bf.2",        0x20000, 0x10000, 0xaf01a718 )
  1935.  
  1936.     ROM_REGION( 0x80000, REGION_CPU2 )    /* Sound CPU */
  1937.     ROM_LOAD( "bf.7",            0x00000,  0x08000, 0xf8b293b5 )
  1938.     ROM_CONTINUE(                0x18000,  0x08000 )
  1939.     ROM_LOAD( "bf.8",            0x30000,  0x10000, 0x8a43497b )
  1940.     ROM_LOAD( "bf.9",            0x50000,  0x10000, 0x1408416f )
  1941.  
  1942.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  1943.     ROM_LOAD( "bfv1_05.bin",     0x00000,  0x08000, 0xbe269dbf )
  1944.     ROM_LOAD( "bfv1_06.bin",     0x08000,  0x08000, 0x022b9de9 )
  1945.  
  1946.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1947.     ROM_LOAD( "bf.10",           0x000000, 0x20000, 0x613313ba )
  1948.     ROM_LOAD( "bf.14",           0x020000, 0x20000, 0xefda5c45 )
  1949.     ROM_LOAD( "bf.18",           0x040000, 0x20000, 0xe886146a )
  1950.     ROM_LOAD( "bf.11",           0x080000, 0x20000, 0x92b42eba )
  1951.     ROM_LOAD( "bf.15",           0x0a0000, 0x20000, 0xba3b9f5a )
  1952.     ROM_LOAD( "bf.19",           0x0c0000, 0x20000, 0x8994bf10 )
  1953.     ROM_LOAD( "bf.12",           0x100000, 0x20000, 0x7ca8bb32 )
  1954.     ROM_LOAD( "bf.16",           0x120000, 0x20000, 0x2aa74125 )
  1955.     ROM_LOAD( "bf.20",           0x140000, 0x20000, 0xbab6a7c5 )
  1956.     ROM_LOAD( "bf.13",           0x180000, 0x20000, 0x56a3a26a )
  1957.     ROM_LOAD( "bf.17",           0x1a0000, 0x20000, 0x6b37d048 )
  1958.     ROM_LOAD( "bf.21",           0x1c0000, 0x20000, 0xbc3b3944 )
  1959. ROM_END
  1960.  
  1961. ROM_START( skysoldr )
  1962.     ROM_REGION( 0x80000, REGION_CPU1 )
  1963.     ROM_LOAD_EVEN( "ss.3",       0x00000, 0x10000, 0x7b88aa2e )
  1964.     ROM_CONTINUE ( 0x40000,      0x10000 | ROMFLAG_ALTERNATE )
  1965.     ROM_LOAD_ODD ( "ss.4",       0x00000, 0x10000, 0xf0283d43 )
  1966.     ROM_CONTINUE ( 0x40001,      0x10000 | ROMFLAG_ALTERNATE )
  1967.     ROM_LOAD_EVEN( "ss.1",       0x20000, 0x10000, 0x20e9dbc7 )
  1968.     ROM_CONTINUE ( 0x60000,      0x10000 | ROMFLAG_ALTERNATE )
  1969.     ROM_LOAD_ODD ( "ss.2",       0x20000, 0x10000, 0x486f3432 )
  1970.     ROM_CONTINUE ( 0x60001,      0x10000 | ROMFLAG_ALTERNATE )
  1971.  
  1972.     ROM_REGION( 0x80000, REGION_CPU2 )    /* Sound CPU */
  1973.     ROM_LOAD( "ss.7",            0x00000, 0x08000, 0xb711fad4 )
  1974.     ROM_CONTINUE(                0x18000, 0x08000 )
  1975.     ROM_LOAD( "ss.8",            0x30000, 0x10000, 0xe5cf7b37 )
  1976.     ROM_LOAD( "ss.9",            0x50000, 0x10000, 0x76124ca2 )
  1977.  
  1978.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  1979.     ROM_LOAD( "ss.5",            0x00000, 0x08000, 0x928ba287 )
  1980.     ROM_LOAD( "ss.6",            0x08000, 0x08000, 0x93b30b55 )
  1981.  
  1982.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1983.     ROM_LOAD( "ss.10",          0x000000, 0x20000, 0xe48c1623 )
  1984.     ROM_LOAD( "ss.14",            0x020000, 0x20000, 0x190c8704 )
  1985.     ROM_LOAD( "ss.18",            0x040000, 0x20000, 0xcb6ff33a )
  1986.     ROM_LOAD( "ss.22",            0x060000, 0x20000, 0xe69b4485 )
  1987.     ROM_LOAD( "ss.11",            0x080000, 0x20000, 0x6c63e9c5 )
  1988.     ROM_LOAD( "ss.15",            0x0a0000, 0x20000, 0x55f71ab1 )
  1989.     ROM_LOAD( "ss.19",            0x0c0000, 0x20000, 0x312a21f5 )
  1990.     ROM_LOAD( "ss.23",            0x0e0000, 0x20000, 0x923c19c2 )
  1991.     ROM_LOAD( "ss.12",            0x100000, 0x20000, 0x63bb4e89 )
  1992.     ROM_LOAD( "ss.16",            0x120000, 0x20000, 0x138179f7 )
  1993.     ROM_LOAD( "ss.20",            0x140000, 0x20000, 0x268cc7b4 )
  1994.     ROM_LOAD( "ss.24",            0x160000, 0x20000, 0xf63b8417 )
  1995.     ROM_LOAD( "ss.13",            0x180000, 0x20000, 0x3506c06b )
  1996.     ROM_LOAD( "ss.17",            0x1a0000, 0x20000, 0xa7f524e0 )
  1997.     ROM_LOAD( "ss.21",            0x1c0000, 0x20000, 0xcb7bf5fe )
  1998.     ROM_LOAD( "ss.25",            0x1e0000, 0x20000, 0x65138016 )
  1999.  
  2000.     ROM_REGION( 0x80000, REGION_USER1 ) /* Reload the code here for upper bank */
  2001.     ROM_LOAD_EVEN( "ss.3",      0x00000, 0x10000, 0x7b88aa2e )
  2002.     ROM_CONTINUE ( 0x40000,     0x10000 | ROMFLAG_ALTERNATE )
  2003.     ROM_LOAD_ODD ( "ss.4",      0x00000, 0x10000, 0xf0283d43 )
  2004.     ROM_CONTINUE ( 0x40001,     0x10000 | ROMFLAG_ALTERNATE )
  2005.     ROM_LOAD_EVEN( "ss.1",      0x20000, 0x10000, 0x20e9dbc7 )
  2006.     ROM_CONTINUE ( 0x60000,     0x10000 | ROMFLAG_ALTERNATE )
  2007.     ROM_LOAD_ODD ( "ss.2",      0x20000, 0x10000, 0x486f3432 )
  2008.     ROM_CONTINUE ( 0x60001,     0x10000 | ROMFLAG_ALTERNATE )
  2009. ROM_END
  2010.  
  2011. ROM_START( goldmedl )
  2012.     ROM_REGION( 0x40000, REGION_CPU1 )
  2013.     ROM_LOAD_EVEN( "gm.3",      0x00000,  0x10000, 0xddf0113c )
  2014.     ROM_LOAD_ODD ( "gm.4",      0x00000,  0x10000, 0x16db4326 )
  2015.     ROM_LOAD_EVEN( "gm.1",      0x20000,  0x10000, 0x54a11e28 )
  2016.     ROM_LOAD_ODD ( "gm.2",      0x20000,  0x10000, 0x4b6a13e4 )
  2017.  
  2018.     ROM_REGION( 0x90000, REGION_CPU2 )    /* Sound CPU */
  2019.     ROM_LOAD( "goldsnd0.c47",   0x00000,  0x08000, 0x031d27dc )
  2020.     ROM_CONTINUE(               0x18000,  0x78000 )
  2021.  
  2022.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  2023.     ROM_LOAD( "gm.5",           0x000000, 0x08000, 0x667f33f1 )
  2024.     ROM_LOAD( "gm.6",           0x008000, 0x08000, 0x56020b13 )
  2025.  
  2026.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  2027.     ROM_LOAD( "goldchr3.c46",   0x000000, 0x80000, 0x6faaa07a )
  2028.     ROM_LOAD( "goldchr2.c45",   0x080000, 0x80000, 0xe6b0aa2c )
  2029.     ROM_LOAD( "goldchr1.c44",   0x100000, 0x80000, 0x55db41cd )
  2030.     ROM_LOAD( "goldchr0.c43",   0x180000, 0x80000, 0x76572c3f )
  2031. ROM_END
  2032.  
  2033. ROM_START( goldmedb )
  2034.     ROM_REGION( 0x40000, REGION_CPU1 )
  2035.     ROM_LOAD_EVEN( "l_3.bin",   0x00000,  0x10000, 0x5e106bcf)
  2036.     ROM_LOAD_ODD ( "l_4.bin",   0x00000,  0x10000, 0xe19966af)
  2037.     ROM_LOAD_EVEN( "l_1.bin",   0x20000,  0x08000, 0x7eec7ee5)
  2038.     ROM_LOAD_ODD ( "l_2.bin",   0x20000,  0x08000, 0xbf59e4f9)
  2039.  
  2040.     ROM_REGION( 0x88000, REGION_CPU2 )    /* Sound CPU */
  2041.     ROM_LOAD( "goldsnd0.c47",   0x00000,  0x08000, 0x031d27dc )
  2042.     ROM_CONTINUE(               0x10000,  0x78000 )
  2043.  
  2044.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  2045.     ROM_LOAD( "gm.5",           0x000000, 0x08000, 0x667f33f1 )
  2046.     ROM_LOAD( "gm.6",           0x008000, 0x08000, 0x56020b13 )
  2047. //    ROM_LOAD( "33.bin", 0x000000, 0x10000, 0x5600b13 )
  2048.  
  2049.     /* I haven't yet verified if these are the same as the bootleg */
  2050.  
  2051.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  2052.     ROM_LOAD( "goldchr3.c46",   0x000000, 0x80000, 0x6faaa07a )
  2053.     ROM_LOAD( "goldchr2.c45",   0x080000, 0x80000, 0xe6b0aa2c )
  2054.     ROM_LOAD( "goldchr1.c44",   0x100000, 0x80000, 0x55db41cd )
  2055.     ROM_LOAD( "goldchr0.c43",   0x180000, 0x80000, 0x76572c3f )
  2056.  
  2057.     ROM_REGION( 0x10000, REGION_USER1 )
  2058.     ROM_LOAD_EVEN( "l_1.bin",   0x00000,  0x08000, 0x7eec7ee5)
  2059.     ROM_LOAD_ODD ( "l_2.bin",   0x00000,  0x08000, 0xbf59e4f9)
  2060. ROM_END
  2061.  
  2062. ROM_START( skyadvnt )
  2063.     ROM_REGION( 0x40000, REGION_CPU1 )
  2064.     ROM_LOAD_EVEN( "sa_v3.1",   0x00000,  0x20000, 0x862393b5 )
  2065.     ROM_LOAD_ODD ( "sa_v3.2",   0x00000,  0x20000, 0xfa7a14d1 )
  2066.  
  2067.     ROM_REGION( 0x90000, REGION_CPU2 )    /* Sound CPU */
  2068.     ROM_LOAD( "sa.3",           0x00000,  0x08000, 0x3d0b32e0 )
  2069.     ROM_CONTINUE(               0x18000,  0x08000 )
  2070.     ROM_LOAD( "sa.4",           0x30000,  0x10000, 0xc2e3c30c )
  2071.     ROM_LOAD( "sa.5",           0x50000,  0x10000, 0x11cdb868 )
  2072.     ROM_LOAD( "sa.6",           0x70000,  0x08000, 0x237d93fd )
  2073.  
  2074.     ROM_REGION( 0x020000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  2075.     ROM_LOAD( "sa.7",           0x000000, 0x08000, 0xea26e9c5 )
  2076.  
  2077.     ROM_REGION( 0x280000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  2078.     ROM_LOAD( "sachr3",         0x000000, 0x80000, 0xa986b8d5 )
  2079.     ROM_LOAD( "sachr2",         0x0a0000, 0x80000, 0x504b07ae )
  2080.     ROM_LOAD( "sachr1",         0x140000, 0x80000, 0xe734dccd )
  2081.     ROM_LOAD( "sachr0",         0x1e0000, 0x80000, 0xe281b204 )
  2082. ROM_END
  2083.  
  2084. ROM_START( gangwars )
  2085.     ROM_REGION( 0x40000, REGION_CPU1 )
  2086.     ROM_LOAD_EVEN( "u1",        0x00000, 0x20000, 0x11433507 )
  2087.     ROM_LOAD_ODD ( "u2",        0x00000, 0x20000, 0x44cc375f )
  2088.  
  2089.     ROM_REGION( 0x90000, REGION_CPU2 )    /* Sound CPU */
  2090.     ROM_LOAD( "u12",            0x00000, 0x08000, 0x2620caa1 )
  2091.     ROM_CONTINUE(               0x18000, 0x08000 )
  2092.     ROM_LOAD( "u9",             0x70000, 0x10000, 0x9136745e )
  2093.     ROM_LOAD( "u10",            0x50000, 0x10000, 0x636978ae )
  2094.     ROM_LOAD( "u11",            0x30000, 0x10000, 0x2218ceb9 )
  2095.  
  2096. /*
  2097.  
  2098. These roms are from the bootleg version, the original graphics
  2099. should be the same.  The original uses 4 512k mask roms and 4 128k
  2100. eeproms to store the same data.  The 512k roms are not dumped but
  2101. the 128k ones are and match these ones.
  2102.  
  2103. */
  2104.  
  2105.     ROM_REGION( 0x020000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  2106.     ROM_LOAD( "gwb_ic.m19",        0x000000, 0x10000, 0xb75bf1d0 )
  2107.  
  2108.     ROM_REGION( 0x280000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  2109.     ROM_LOAD( "gwb_ic.308",        0x000000, 0x10000, 0x321a2fdd )
  2110.     ROM_LOAD( "gwb_ic.309",        0x010000, 0x10000, 0x4d908f65 )
  2111.     ROM_LOAD( "gwb_ic.310",        0x020000, 0x10000, 0xfc888541 )
  2112.     ROM_LOAD( "gwb_ic.311",        0x030000, 0x10000, 0x181b128b )
  2113.     ROM_LOAD( "gwb_ic.312",        0x040000, 0x10000, 0x930665f3 )
  2114.     ROM_LOAD( "gwb_ic.313",        0x050000, 0x10000, 0xc18f4ca8 )
  2115.     ROM_LOAD( "gwb_ic.314",        0x060000, 0x10000, 0xdfc44b60 )
  2116.     ROM_LOAD( "gwb_ic.307",        0x070000, 0x10000, 0x28082a7f )
  2117.     ROM_LOAD( "gwb_ic.320",        0x080000, 0x10000, 0x9a7b51d8 )
  2118.     ROM_LOAD( "gwb_ic.321",        0x090000, 0x10000, 0x6b421c7b )
  2119.     ROM_LOAD( "gwb_ic.300",        0x0a0000, 0x10000, 0xf3fa0877 )
  2120.     ROM_LOAD( "gwb_ic.301",        0x0b0000, 0x10000, 0xf8c866de )
  2121.     ROM_LOAD( "gwb_ic.302",        0x0c0000, 0x10000, 0x5b0d587d )
  2122.     ROM_LOAD( "gwb_ic.303",        0x0d0000, 0x10000, 0xd8c0e102 )
  2123.     ROM_LOAD( "gwb_ic.304",        0x0e0000, 0x10000, 0xb02bc9d8 )
  2124.     ROM_LOAD( "gwb_ic.305",        0x0f0000, 0x10000, 0x5e04a9aa )
  2125.     ROM_LOAD( "gwb_ic.306",        0x100000, 0x10000, 0xe2172955 )
  2126.     ROM_LOAD( "gwb_ic.299",        0x110000, 0x10000, 0xe39f5599 )
  2127.     ROM_LOAD( "gwb_ic.318",        0x120000, 0x10000, 0x9aeaddf9 )
  2128.     ROM_LOAD( "gwb_ic.319",        0x130000, 0x10000, 0xc5b862b7 )
  2129.     ROM_LOAD( "gwb_ic.292",        0x140000, 0x10000, 0xc125f7be )
  2130.     ROM_LOAD( "gwb_ic.293",        0x150000, 0x10000, 0xc04fce8e )
  2131.     ROM_LOAD( "gwb_ic.294",        0x160000, 0x10000, 0x4eda3df5 )
  2132.     ROM_LOAD( "gwb_ic.295",        0x170000, 0x10000, 0x6e60c475 )
  2133.     ROM_LOAD( "gwb_ic.296",        0x180000, 0x10000, 0x99b2a557 )
  2134.     ROM_LOAD( "gwb_ic.297",        0x190000, 0x10000, 0x10373f63 )
  2135.     ROM_LOAD( "gwb_ic.298",        0x1a0000, 0x10000, 0xdf37ec4d )
  2136.     ROM_LOAD( "gwb_ic.291",        0x1b0000, 0x10000, 0xbeb07a2e )
  2137.     ROM_LOAD( "gwb_ic.316",        0x1c0000, 0x10000, 0x655b1518 )
  2138.     ROM_LOAD( "gwb_ic.317",        0x1d0000, 0x10000, 0x1622fadd )
  2139.     ROM_LOAD( "gwb_ic.284",        0x1e0000, 0x10000, 0x4aa95d66 )
  2140.     ROM_LOAD( "gwb_ic.285",        0x1f0000, 0x10000, 0x3a1f3ce0 )
  2141.     ROM_LOAD( "gwb_ic.286",        0x200000, 0x10000, 0x886e298b )
  2142.     ROM_LOAD( "gwb_ic.287",        0x210000, 0x10000, 0xb9542e6a )
  2143.     ROM_LOAD( "gwb_ic.288",        0x220000, 0x10000, 0x8e620056 )
  2144.     ROM_LOAD( "gwb_ic.289",        0x230000, 0x10000, 0xc754d69f )
  2145.     ROM_LOAD( "gwb_ic.290",        0x240000, 0x10000, 0x306d1963 )
  2146.     ROM_LOAD( "gwb_ic.283",        0x250000, 0x10000, 0xb46e5761 )
  2147.     ROM_LOAD( "gwb_ic.280",        0x260000, 0x10000, 0x222b3dcd )
  2148.     ROM_LOAD( "gwb_ic.315",        0x270000, 0x10000, 0xe7c9b103 )
  2149.  
  2150.     ROM_REGION( 0x40000, REGION_USER1 ) /* Extra code bank */
  2151.     ROM_LOAD_EVEN( "u3",        0x00000,  0x20000, 0xde6fd3c0 )
  2152.     ROM_LOAD_ODD ( "u4",        0x00000,  0x20000, 0x43f7f5d3 )
  2153. ROM_END
  2154.  
  2155. ROM_START( gangwarb )
  2156.     ROM_REGION( 0x40000, REGION_CPU1 )
  2157.     ROM_LOAD_EVEN( "gwb_ic.m15", 0x00000, 0x20000, 0x7752478e )
  2158.     ROM_LOAD_ODD ( "gwb_ic.m16", 0x00000, 0x20000, 0xc2f3b85e )
  2159.  
  2160.     ROM_REGION( 0x90000, REGION_CPU2 )    /* Sound CPU */
  2161.     ROM_LOAD( "gwb_ic.380",      0x00000, 0x08000, 0xe6d6c9cf )
  2162.     ROM_CONTINUE(                0x18000, 0x08000 )
  2163.     ROM_LOAD( "gwb_ic.419",      0x30000, 0x10000, 0x84e5c946 )
  2164.     ROM_LOAD( "gwb_ic.420",      0x50000, 0x10000, 0xeb305d42 )
  2165.     ROM_LOAD( "gwb_ic.421",      0x70000, 0x10000, 0x7b9f2608 )
  2166.  
  2167.     ROM_REGION( 0x020000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  2168.     ROM_LOAD( "gwb_ic.m19",        0x000000, 0x10000, 0xb75bf1d0 )
  2169.  
  2170.     ROM_REGION( 0x280000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  2171.     ROM_LOAD( "gwb_ic.308",        0x000000, 0x10000, 0x321a2fdd )
  2172.     ROM_LOAD( "gwb_ic.309",        0x010000, 0x10000, 0x4d908f65 )
  2173.     ROM_LOAD( "gwb_ic.310",        0x020000, 0x10000, 0xfc888541 )
  2174.     ROM_LOAD( "gwb_ic.311",        0x030000, 0x10000, 0x181b128b )
  2175.     ROM_LOAD( "gwb_ic.312",        0x040000, 0x10000, 0x930665f3 )
  2176.     ROM_LOAD( "gwb_ic.313",        0x050000, 0x10000, 0xc18f4ca8 )
  2177.     ROM_LOAD( "gwb_ic.314",        0x060000, 0x10000, 0xdfc44b60 )
  2178.     ROM_LOAD( "gwb_ic.307",        0x070000, 0x10000, 0x28082a7f )
  2179.     ROM_LOAD( "gwb_ic.320",        0x080000, 0x10000, 0x9a7b51d8 )
  2180.     ROM_LOAD( "gwb_ic.321",        0x090000, 0x10000, 0x6b421c7b )
  2181.     ROM_LOAD( "gwb_ic.300",        0x0a0000, 0x10000, 0xf3fa0877 )
  2182.     ROM_LOAD( "gwb_ic.301",        0x0b0000, 0x10000, 0xf8c866de )
  2183.     ROM_LOAD( "gwb_ic.302",        0x0c0000, 0x10000, 0x5b0d587d )
  2184.     ROM_LOAD( "gwb_ic.303",        0x0d0000, 0x10000, 0xd8c0e102 )
  2185.     ROM_LOAD( "gwb_ic.304",        0x0e0000, 0x10000, 0xb02bc9d8 )
  2186.     ROM_LOAD( "gwb_ic.305",        0x0f0000, 0x10000, 0x5e04a9aa )
  2187.     ROM_LOAD( "gwb_ic.306",        0x100000, 0x10000, 0xe2172955 )
  2188.     ROM_LOAD( "gwb_ic.299",        0x110000, 0x10000, 0xe39f5599 )
  2189.     ROM_LOAD( "gwb_ic.318",        0x120000, 0x10000, 0x9aeaddf9 )
  2190.     ROM_LOAD( "gwb_ic.319",        0x130000, 0x10000, 0xc5b862b7 )
  2191.     ROM_LOAD( "gwb_ic.292",        0x140000, 0x10000, 0xc125f7be )
  2192.     ROM_LOAD( "gwb_ic.293",        0x150000, 0x10000, 0xc04fce8e )
  2193.     ROM_LOAD( "gwb_ic.294",        0x160000, 0x10000, 0x4eda3df5 )
  2194.     ROM_LOAD( "gwb_ic.295",        0x170000, 0x10000, 0x6e60c475 )
  2195.     ROM_LOAD( "gwb_ic.296",        0x180000, 0x10000, 0x99b2a557 )
  2196.     ROM_LOAD( "gwb_ic.297",        0x190000, 0x10000, 0x10373f63 )
  2197.     ROM_LOAD( "gwb_ic.298",        0x1a0000, 0x10000, 0xdf37ec4d )
  2198.     ROM_LOAD( "gwb_ic.291",        0x1b0000, 0x10000, 0xbeb07a2e )
  2199.     ROM_LOAD( "gwb_ic.316",        0x1c0000, 0x10000, 0x655b1518 )
  2200.     ROM_LOAD( "gwb_ic.317",        0x1d0000, 0x10000, 0x1622fadd )
  2201.     ROM_LOAD( "gwb_ic.284",        0x1e0000, 0x10000, 0x4aa95d66 )
  2202.     ROM_LOAD( "gwb_ic.285",        0x1f0000, 0x10000, 0x3a1f3ce0 )
  2203.     ROM_LOAD( "gwb_ic.286",        0x200000, 0x10000, 0x886e298b )
  2204.     ROM_LOAD( "gwb_ic.287",        0x210000, 0x10000, 0xb9542e6a )
  2205.     ROM_LOAD( "gwb_ic.288",        0x220000, 0x10000, 0x8e620056 )
  2206.     ROM_LOAD( "gwb_ic.289",        0x230000, 0x10000, 0xc754d69f )
  2207.     ROM_LOAD( "gwb_ic.290",        0x240000, 0x10000, 0x306d1963 )
  2208.     ROM_LOAD( "gwb_ic.283",        0x250000, 0x10000, 0xb46e5761 )
  2209.     ROM_LOAD( "gwb_ic.280",        0x260000, 0x10000, 0x222b3dcd )
  2210.     ROM_LOAD( "gwb_ic.315",        0x270000, 0x10000, 0xe7c9b103 )
  2211.  
  2212.     ROM_REGION( 0x40000, REGION_USER1 ) /* Extra code bank */
  2213.     ROM_LOAD_EVEN( "gwb_ic.m17", 0x00000, 0x20000, 0x2a5fe86e )
  2214.     ROM_LOAD_ODD ( "gwb_ic.m18", 0x00000, 0x20000, 0xc8b60c53 )
  2215. ROM_END
  2216.  
  2217. ROM_START( sbasebal )
  2218.     ROM_REGION( 0x40000, REGION_CPU1 )
  2219.     ROM_LOAD_EVEN( "snksb1.bin", 0x00000, 0x20000, 0x304fef2d )
  2220.     ROM_LOAD_ODD ( "snksb2.bin", 0x00000, 0x20000, 0x35821339 )
  2221.  
  2222.     ROM_REGION( 0x90000, REGION_CPU2 )    /* Sound CPU */
  2223.     ROM_LOAD( "snksb3.bin",      0x00000, 0x08000, 0x89e12f25 )
  2224.     ROM_CONTINUE(                0x18000, 0x08000 )
  2225.     ROM_LOAD( "snksb4.bin",      0x30000, 0x10000, 0xcca2555d )
  2226.     ROM_LOAD( "snksb5.bin",      0x50000, 0x10000, 0xf45ee36f )
  2227.     ROM_LOAD( "snksb6.bin",      0x70000, 0x10000, 0x651c9472 )
  2228.  
  2229.     ROM_REGION( 0x020000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* chars */
  2230.     ROM_LOAD( "snksb7.bin",      0x000000, 0x10000, 0x8f3c2e25 )
  2231.  
  2232.     ROM_REGION( 0x280000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  2233.     ROM_LOAD( "kcbchr3.bin",     0x000000, 0x80000, 0x719071c7 )
  2234.     ROM_LOAD( "kcbchr2.bin",     0x0a0000, 0x80000, 0x014f0f90 )
  2235.     ROM_LOAD( "kcbchr1.bin",     0x140000, 0x80000, 0xa5ce1e10 )
  2236.     ROM_LOAD( "kcbchr0.bin",     0x1e0000, 0x80000, 0xb8a1a088 )
  2237. ROM_END
  2238.  
  2239. /******************************************************************************/
  2240.  
  2241. static READ_HANDLER( timesold_cycle_r )
  2242. {
  2243.     int ret=READ_WORD(&shared_ram[0x8]);
  2244.  
  2245.     if (cpu_get_pc()==0x9ea2 && (ret&0xff00)==0) {
  2246.         cpu_spinuntil_int();
  2247.         return 0x100 | (ret&0xff);
  2248.     }
  2249.  
  2250.     return ret;
  2251. }
  2252.  
  2253. static READ_HANDLER( skysoldr_cycle_r )
  2254. {
  2255.     int ret=READ_WORD(&shared_ram[0x8]);
  2256.  
  2257.     if (cpu_get_pc()==0x1f4e && (ret&0xff00)==0) {
  2258.         cpu_spinuntil_int();
  2259.         return 0x100 | (ret&0xff);
  2260.     }
  2261.  
  2262.     return ret;
  2263. }
  2264.  
  2265. static READ_HANDLER( gangwars_cycle_r )
  2266. {
  2267.     int ret=READ_WORD(&shared_ram[0x206]);
  2268.  
  2269.     if (cpu_get_pc()==0xbbca || cpu_get_pc()==0xbbb6) {
  2270.         cpu_spinuntil_int();
  2271.         return (ret+2)&0xff;
  2272.     }
  2273.  
  2274.     return ret;
  2275. }
  2276.  
  2277. static void init_timesold(void)
  2278. {
  2279.     install_mem_read_handler(0, 0x40008, 0x40009, timesold_cycle_r);
  2280.     invert_controls=0;
  2281. }
  2282.  
  2283. static void init_skysoldr(void)
  2284. {
  2285.     install_mem_read_handler(0, 0x40008, 0x40009, skysoldr_cycle_r);
  2286.     cpu_setbank(8, (memory_region(REGION_USER1))+0x40000);
  2287.     invert_controls=0;
  2288. }
  2289.  
  2290. static void init_goldmedb(void)
  2291. {
  2292.     cpu_setbank(8, memory_region(REGION_USER1));
  2293.     invert_controls=0;
  2294. }
  2295.  
  2296. static void init_gangwars(void)
  2297. {
  2298.     install_mem_read_handler(0, 0x40206, 0x40207, gangwars_cycle_r);
  2299.     cpu_setbank(8, memory_region(REGION_USER1));
  2300.     invert_controls=0;
  2301.     microcontroller_id=0x8512;
  2302. }
  2303.  
  2304. static void init_btlfield(void)
  2305. {
  2306.     invert_controls=1;
  2307. }
  2308.  
  2309. static void init_sbasebal(void)
  2310. {
  2311.     unsigned char *RAM = memory_region(REGION_CPU1);
  2312.  
  2313.     /* Game hangs on divide by zero?!  Patch it */
  2314.     WRITE_WORD (&RAM[0xb672],0x4E71);
  2315.  
  2316.     /* And patch the ROM checksums */
  2317.     WRITE_WORD (&RAM[0x44e],0x4E71);
  2318.     WRITE_WORD (&RAM[0x450],0x4E71);
  2319.     WRITE_WORD (&RAM[0x458],0x4E71);
  2320.     WRITE_WORD (&RAM[0x45a],0x4E71);
  2321.  
  2322.     microcontroller_id=0x8512;
  2323.     invert_controls=0;
  2324. }
  2325.  
  2326. static void init_skyadvnt(void)
  2327. {
  2328.     microcontroller_id=0x8814;
  2329.     invert_controls=0;
  2330. }
  2331.  
  2332. static void init_kyros(void)
  2333. {
  2334.     microcontroller_id=0x12;
  2335. }
  2336.  
  2337. static void init_sstingry(void)
  2338. {
  2339.     microcontroller_id=0xff;
  2340. }
  2341.  
  2342. static void init_goldmedl(void)
  2343. {
  2344.     invert_controls=0;
  2345. }
  2346.  
  2347. /******************************************************************************/
  2348.  
  2349. GAMEX(1985, kouyakyu, 0,        kouyakyu,      sstingry, 0,        ROT0,       "Alpha Denshi Co.", "The Koukouyakyuh", GAME_NOT_WORKING )
  2350. GAMEX(1986, sstingry, 0,        sstingry,      sstingry, sstingry, ROT90,      "Alpha Denshi Co.", "Super Stingray", GAME_WRONG_COLORS | GAME_NO_SOUND )
  2351. GAMEX(1987, kyros,    0,        kyros,         kyros,    kyros,    ROT90,      "World Games Inc", "Kyros", GAME_WRONG_COLORS | GAME_NO_SOUND )
  2352. GAMEX(1988, paddlema, 0,        alpha68k_I,    timesold, 0,        ROT90,      "SNK", "Paddle Mania", GAME_NOT_WORKING | GAME_NO_COCKTAIL )
  2353. GAME( 1987, timesold, 0,        alpha68k_II,   timesold, timesold, ROT90,      "SNK / Romstar", "Time Soldiers (US Rev 3)" )
  2354. GAME( 1987, timesol1, timesold, alpha68k_II,   timesold, btlfield, ROT90,      "SNK / Romstar", "Time Soldiers (US Rev 1)" )
  2355. GAME( 1987, btlfield, timesold, alpha68k_II,   btlfield, btlfield, ROT90,      "SNK", "Battle Field (Japan)" )
  2356. GAME( 1988, skysoldr, 0,        alpha68k_II,   skysoldr, skysoldr, ROT90,      "SNK / Romstar", "Sky Soldiers (US)" )
  2357. GAMEX(1988, goldmedl, 0,        alpha68k_II,   goldmedl, goldmedl, ROT0,       "SNK", "Gold Medalist", GAME_NOT_WORKING | GAME_NO_COCKTAIL )
  2358. GAMEX(1988, goldmedb, goldmedl, alpha68k_II,   goldmedl, goldmedb, ROT0,       "bootleg", "Gold Medalist (bootleg)", GAME_NOT_WORKING | GAME_NO_COCKTAIL )
  2359. GAMEX(1989, skyadvnt, 0,        alpha68k_V,    skyadvnt, skyadvnt, ROT90,      "SNK of America (licensed from Alpha)", "Sky Adventure (US)", GAME_NO_COCKTAIL )
  2360. GAME( 1989, gangwars, 0,        alpha68k_V,    gangwars, gangwars, ROT0_16BIT, "Alpha Denshi Co.", "Gang Wars (US)" )
  2361. GAME( 1989, gangwarb, gangwars, alpha68k_V,    gangwars, gangwars, ROT0_16BIT, "bootleg", "Gang Wars (bootleg)" )
  2362. GAMEX(1989, sbasebal, 0,        alpha68k_V_sb, sbasebal, sbasebal, ROT0,       "SNK of America (licensed from Alpha)", "Super Champion Baseball", GAME_NO_COCKTAIL )
  2363.  
  2364. /*
  2365.  Super Baseball and Sky Adventure don't write to their flipscreen ports - I'm not yet sure if this
  2366. is a microcontroller protection issue (flipscreen is controlled by the Alpha microcontroller) or these
  2367. games simply don't support it.
  2368. */
  2369.